Create A Windows Service / Delete A Windows Service (sc create / sc delete)

Read Time:1 Min, 21 Sec

Today, I came across a Windows Service on a server that I inherited. By the name of the service I could tell that it was built in-house and I even found enough information to determine who the developed it. However, since it was not in the Add / Remove Programs list of the Control Panel, I wasn’t sure how to remove it. So, I found the following on Geeks With Blogs – Shahed’s Blog:

Recently, I was trying to delete a windows service. Normally it should not be necessary to manually delete a service. Uninstalling an application should remove its associated service (if any).

However, I installed some beta products and a service created by one of the applications was not removed automatically. Its very easy to remove a service from registry if you know the right path. Here is how I did that:

1. Run Regedit or Regedt32

2. Find the registry entry "HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services"

3. Look for the service there and delete it. You can look at the keys to know what files the service was using and delete them as well (if necessary).

alternatively, you can also use command prompt and delete a service using following command:

sc delete < SERVICE name&gt;
or to create, simply type
sc create <SERVICE name&gt;

Update:
If you have space in the file path you need to use quotation marks ("). For example:
sc create "MySQL" binpath= "C:Archivos de programaMySQLMySQL Server 5.1binmysqld.exe"

I used the “sc delete” method to remove the service.

Thanks, Shahed!

Author

Stewart Schatz

Career: Principal CNC Consultant for Syntax Systems Limited specializing Oracle JD Edwards EnterpriseOne and the technology that supports it. Side Hustle: Owner/Operator of E1Tips.com Location: Lancaster, PA USA  What I like to do: Invest in Family, Explore Technology, Lead Teams, Share Knowledge/Experience, Hunt, Hike, etc.
Happy
Happy
0
Sad
Sad
0
Excited
Excited
0
Sleepy
Sleepy
0
Angry
Angry
0
Surprise
Surprise
0

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Previous post How To Build A SRVPGM Using The Command Line
Next post Windows Vista / Windows 7 & IBM iSeries IFS Mapped Drive