How can I install/unistall windows service using command line ?

I have developped a service:
:
myService.exe (which is a service) and located in windows/system32

How can I install/unistall  this service using command line ?
(I am doing it through Inno setup, but I need to do it through command line)

regards
yarekAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
oBdAConnect With a Mentor Commented:
You can do that with sc.exe:
How to create a Windows service by using Sc.exe
http://support.microsoft.com/kb/251192/en-us
0
 
jlundfeltCommented:
You can do a NET STOP MyService and the a REG DELETE

e.g.

REG DELETE HKLM\System\CurrentControlSet\Services\MyService
0
 
yarekAuthor Commented:
I need to INSTALL it : NOT TO START IT !
0
 
jlundfeltCommented:
Well if you need to install it, just add the registry keys you need with REG ADD, or an installer (Wise, Nullsoft,etc..) and start it.

Look at any existing service to see what keys you need. But if its just a process, it won't start correctly.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.