Saturday, November 05, 2011

Windows SC.EXE Command Gotcha


You wanted to create/install a service using the SC.EXE command on Windows 2008 (XP as well) but it does not seem to work. It come back with the help message suggesting that you have had some errors.

sc create MyService binpath="c:\MyService\MyService.exe" type="own" start="auto"

This WILL result in errors and it won't tell you how you have errored.


Fix your brains that it is not Unix that you are dealing with, since we cannot fix someone who designed it at Microsoft.

sc create MyService binpath= "c:\MyService\MyService.exe" type= "own" start= "auto"

Do you see the difference between the two?

There is a blank after each= sign.  Not an example of world-class coding.

No comments: