• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5255
  • Last Modified:

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
0
yarek
Asked:
yarek
  • 2
1 Solution
 
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
 
oBdACommented:
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

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now