Solved

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

Posted on 2008-10-14
4
5,210 Views
Last Modified: 2008-11-04
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
Comment
Question by:yarek
  • 2
4 Comments
 
LVL 2

Expert Comment

by:jlundfelt
ID: 22713926
You can do a NET STOP MyService and the a REG DELETE

e.g.

REG DELETE HKLM\System\CurrentControlSet\Services\MyService
0
 

Author Comment

by:yarek
ID: 22713945
I need to INSTALL it : NOT TO START IT !
0
 
LVL 2

Expert Comment

by:jlundfelt
ID: 22715535
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
 
LVL 83

Accepted Solution

by:
oBdA earned 500 total points
ID: 22724954
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

Do email signature updates give you a headache?

Constantly trying to correctly format email signatures? Spending all of your time at every user’s desk to make updates? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today!

Join & Write a Comment

The use of stolen credentials is a hot commodity this year allowing threat actors to move laterally within the network in order to avoid breach detection.
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now