How to delete a service in Windows

Configurare noua (How To)

Situatie

1.Deleting Services Using 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 a 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

  1. 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.
  2. I suggest you back up 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.

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.

To summarize 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
2.Removing Services from the Command Line

This is probably the most complex yet the most effective 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 face an issue with the command and get an “access denied” error that you need administrative privileges you need to click on the Windows start button, 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 may trigger a UAC prompt under Vista, Windows 7, or 10 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.

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.

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.

The name may have implications on the command. Let’s say we want to delete the Apple Mobile Device service, a leftover piece 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.

To summarize: To delete services from the command line, do the following:

  1. Open an elevated command prompt.
  2. Open the Windows Services management listing.
  3. Identify the service name and not the display name by double-clicking on a service.
  4. Run the command, make sure you use quotation marks if the name contains spaces.
  5. The message [SC] DeleteService SUCCESS indicates that the service has been successfully removed from the operating system.

Solutie

Tip solutie

Permanent
Etichetare:

Voteaza

(21 din 38 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?