views:

50

answers:

1

When using sc create ServiceName binPath= "the path", how can arguments be passed to the Installer class's Context.Parameters collection?

My reading of the sc.exe documentation is that such arguments could only be passed on the end of binPath, but I have not found an example or been able to successfully do this.

A: 

Be sure to have quotes at beginning and end of your binPath value.

cripox
Given a path "c:\abc\def.exe", I tried to pass in Param1="ghi" like this: binPath= "c:\abc\def.exe /Param1=ghi". But no worky...
sympatric greg