Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


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

Posted on 2008-10-14
Medium Priority
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)

Question by:yarek
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Expert Comment

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


REG DELETE HKLM\System\CurrentControlSet\Services\MyService

Author Comment

ID: 22713945
I need to INSTALL it : NOT TO START IT !

Expert Comment

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.
LVL 85

Accepted Solution

oBdA earned 1500 total points
ID: 22724954
You can do that with sc.exe:
How to create a Windows service by using Sc.exe

Featured Post

Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

704 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