« BackgroundWorker class | Main | Battling VSTO's SerializationException: Type is not resolved for ... »
November 07, 2006
Using command line to install Windows Service
This usefull command is not the most intuitive command. The sc command allows you to install/delete Windows Services. I have used this nifty command quite often in the past project to remove erroneous Windows Service. Microsoft has a good KB article.
Things to watch out is the escaping of the binPath. If there are spaces in your binPath you must escape it using the " character which must be escaped again using the \ character.
For example:
c:\sc create MyService binPath= "\"c:\program files\my service\service.exe\""
Posted by vhadiant at November 7, 2006 08:57 PM
Trackback Pings
TrackBack URL for this entry:
http://www.hadianto.net/mov32/mt-tb.cgi/254
Comments
Nice! Haven't given this a go yet but looks really nifty. Plus, I just wanted to post a comment on your blog!
flee out.
Posted by: freddy at February 5, 2007 09:58 AM
