![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | params containing blanks This is an example of a cmd script I need to run: powershell .\startSybaseSvcs "FglClient_ch-xxxx-01" "SYSAM" "Sybase SQLServer _ CHXXXX01" "Sybase BCKServer _ CHXXXXO01_BS" The problem is that the 3rd and 4th parameters contain blanks, so the startSybaseSvcs script is picking up params 3 and 4 as 'Sybase' and 'SQLServer'. How can I pass across the parameters so that they're picked up as intended, containing blanks? Jay |
My System Specs![]() |
| | #2 (permalink) |
| | Re: params containing blanks On 2007-06-20 14:28:52 +0100, "Jay" <j@b.com> said: > This is an example of a cmd script I need to run: > > powershell .\startSybaseSvcs "FglClient_ch-xxxx-01" "SYSAM" "Sybase > SQLServer _ CHXXXX01" "Sybase BCKServer _ CHXXXXO01_BS" > > The problem is that the 3rd and 4th parameters contain blanks, so the > startSybaseSvcs script is picking up params 3 and 4 as 'Sybase' and > 'SQLServer'. How can I pass across the parameters so that they're > picked up as intended, containing blanks? > > Jay Try escaping the space "Sybase` SQLServer..." "Sybase` BCKServer..." n |
My System Specs![]() |
| | #3 (permalink) |
| | Re: params containing blanks I worked out how to do it. powershell .\startSybaseSvcs "FglClient_ch-xxxx-01" "SYSAM" "Sybase` SQLServer` _` CHXXXX01" "Sybase` BCKServer` _` CHXXXXO01_BS" does the trick. It all became clear after a pint of Guinness. Jay "Jay" <j@b.com> wrote in message news:es8t76zsHHA.1776@TK2MSFTNGP03.phx.gbl... > This is an example of a cmd script I need to run: > > powershell .\startSybaseSvcs "FglClient_ch-xxxx-01" "SYSAM" "Sybase > SQLServer _ CHXXXX01" "Sybase BCKServer _ CHXXXXO01_BS" > > The problem is that the 3rd and 4th parameters contain blanks, so the > startSybaseSvcs script is picking up params 3 and 4 as 'Sybase' and > 'SQLServer'. How can I pass across the parameters so that they're picked > up as intended, containing blanks? > > Jay > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: params containing blanks Thanks Neil. "Neil Chambers" <n3llyb0y@aol.com> wrote in message news:2007062014480882327-n3llyb0y@aolcom... > On 2007-06-20 14:28:52 +0100, "Jay" <j@b.com> said: > >> This is an example of a cmd script I need to run: >> >> powershell .\startSybaseSvcs "FglClient_ch-xxxx-01" "SYSAM" "Sybase >> SQLServer _ CHXXXX01" "Sybase BCKServer _ CHXXXXO01_BS" >> >> The problem is that the 3rd and 4th parameters contain blanks, so the >> startSybaseSvcs script is picking up params 3 and 4 as 'Sybase' and >> 'SQLServer'. How can I pass across the parameters so that they're picked >> up as intended, containing blanks? >> >> Jay > > Try escaping the space > > "Sybase` SQLServer..." "Sybase` BCKServer..." > > n > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Is there a better way how to get command-line params like WSH ? | PowerShell | |||
| Passing function params by ref? | PowerShell | |||
| display blanks out | Vista hardware & devices | |||
| how do you pass named params to funcs by way of variables | PowerShell | |||
| passing params to windows commands | PowerShell | |||