1.

Solve : Start Command w/Parameters?

Answer»

On SEVERAL occasions I have needed to start a command with parameters in a .bat file but I am unsure how to pass the parameters properly. For example, I need to RUN the FOLLOWING command from a batch file:

start c:\RunProgram.vbs "cscript.exe %22c:\PROGRAM Files\Microsoft Shared Computer Toolkit\scripts\DiskProtect.wsf%22 /Save" /computer:xxx.xxx.xx.xxx /username:local\xxxx /password:xxxx

notice the % and the ", all of which need to be included. How can I do this properly?

THANKS!
sromine,

Use %% instead of %, i.e.:

[edit]start c:\RunProgram.vbs "cscript.exe %%22c:\Program Files\Microsoft Shared Computer Toolkit\scripts\DiskProtect.wsf%%22 /Save" /computer:xxx.xxx.xx.xxx /username:local\xxxx /password:xxxx[/edit]

DOS IT HELP?



Discussion

No Comment Found