Pages

Saturday 5 January 2013

How To Remove Services In Windows

Removing Services from the command line

This is probably the most complex solution. You may need to open an elevated command prompt first, depending on the version of Windows. You can try and open the command line normally with the hotkey Windows-r, typing cmd and pressing enter. If you issue the command and get an error that you need administrative privileges you need to click on the Windows start orb, select Programs (or All Programs), then Accessories. Locate Command Prompt, right-click the item in the start menu and select Run as Administrator from the context menu. This triggers an UAC prompt under Vista and Windows 7 that needs to be accepted.
The command prompt displays Administrator: Command Prompt if the operation was successful.
Windows 7 and Vista users who have the search box enabled in the start menu can enter cmd instead in the box to open the elevated command prompt with Ctrl-Shift-Enter.
administrator command prompt
Windows Services are deleted with the command sc delete followed by the name of the service. Since it is likely that you do not know the name you need to open the Windows Services listing. This is done with the keys Windows-r, typing services.msc and enter on the keyboard.
windows services
What you need is the service name, not the display name that is shown in the main listing. The names may be identical sometimes. Double-click the service that you want to delete to see both names. Apple Mobile Device is for instance the service name and display name of the service. Microsoft on the other hand often uses short cryptic service names and longer display names. The Bitlocker Drive Encryption Service (display name) is listed with the service name BDESVC.
service name
The name may have implications on the command. Lets say we want to delete the Apple Mobile Device service, a leftover after uninstalling iTunes. The command to do that on the command line is sc delete “Apple Mobile Device”.
Notice the quotation marks around the service’s name? A space is generally seen as a new command or parameter, which means that it is necessary to use quotation marks if names or commands make use of spaces to basically tell the program that they are all part of a word or phrase. Take a look at the screenshot below to see what happens if the command is issued without quotation marks, and then with.
sc delete service
To paraphrase: To delete services from the command line you need to do the following:
  • Open an elevated command prompt
  • Open the Windows Services management listing
  • Identify the service name and not the display name by double-clicking on a service.
  • Run the command, make sure you use quotation marks if the name contains spaces.
  • The message [SC] DeleteService SUCCESS indicates that the service has been successfully removed from the operating system.

Deleting Services in the Windows Registry

All services are listed in the Windows Registry. If a service’s Registry key is removed, it will be deleted from the system. This method is a lot faster usually. Here is how it is done:
Use the hotkey Windows-r to open a run box, enter regedit in the box and press enter. Some users may see an UAC prompt that they need to accept.
The window displays folders on the left side, and subfolders or parameters on the right. Locate the following Registry key by following the folder structure on the left.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services
A click on services lists all available Windows Services as subfolders of that key. Please note that the service’s Service Name is used as the folder name which means that you may need to open the Services listing once again to identify the right services.
I suggest you backup the key first before you start deleting services. Left-click on the services folder and select File > Export to backup the key. Type in a file name and save it to the hard drive.
You can import the backed up key again by selecting File > Import and the file that you have previously exported.
windows services registry
Locate the service that you want to delete in the listing. A left-click selects the service and displays its parameters on the right pane. To remove a service press delete on the keyboard, or right-click the service and select delete from the context menu.
delete service
To paraphrase this method:
  • Open the Windows Registry
  • Navigate to the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services
  • Backup the services key
  • Identify the service that you want to delete
  • Left-click on that service and press delete on the keyboard.

No comments:

Post a Comment