Use the SC command, like this (you need to be on a command prompt to execute the commands in this post):
SC STOP shortservicename
SC DELETE shortservicename
Note: You need to run the command prompt as an administrator, not just logged in as the administrator, but also with administrative rights. If you get errors above about not having the necessary access rights to stop and/or delete the service, run the command prompt as an administrator. You can do this by searching for the command prompt on your start menu and then right-clicking and selecting «Run as administrator». Note to PowerShell users: sc
is aliased to set-content
. So sc delete service
will actually create a file called delete
with the content service
. To do this in Powershell, use sc.exe delete service
instead
If you need to find the short service name of a service, use the following command to generate a text file containing a list of services and their statuses:
SC QUERY state= all >"C:Service List.txt"
For a more concise list, execute this command:
SC QUERY state= all | FIND "_NAME"
The short service name will be listed just above the display name, like this:
SERVICE_NAME: MyService
DISPLAY_NAME: My Special Service
And thus to delete that service:
SC STOP MyService
SC DELETE MyService
If you are a fan of tweaking your system and disabling services, you might find that over time your Windows Services list becomes large and unwieldy. It’s easy enough to delete a Windows service using the Command Prompt or Registry editor.
Before you remove a service, you need to understand a few points:
When you delete a service, it will disappear forever from the system, and it is not easy to restore it, and in some cases it is simply impossible.
Removing certain services can cause the inactivity of certain programs. Therefore, you should not delete the service if you are not 100% sure what it is responsible for.
Do not remove the Windows 10 system services, as this may lead to the inoperability of the entire system.
You also need to understand when it is necessary to remove the Windows service:
Frequently, programs when uninstalled leave their services intact, and every time the computer starts up, the system tries to start such a service, but due to the lack of executable or library files, it cannot do so, generating an error.
Some viruses and trojans to disguise their destructive actions can create a new service in the system.
And even if your antivirus removes the body of the virus, the service may remain, and you will have to manually remove it.
It is also possible that the system performance decreases due to the large number of processes running as services, and you decide to remove (and not just stop) a number of unnecessary services in Windows 10.
1. Open Services With Help of Windows Search Box
Hit Start, type “services” into the search dialog box, and then click the “Services” to get a list of services.
2. Find the Service and Move to Properties
In the “Services” window, scroll down and find the service you’re after. Right-click the service and choose the “Properties” command.
3. The next Step Is to Copy the Service Name
In the service’s properties window, copy (or write down) the text to the right of the “Service name” entry.
4. Open Command Line With Administrative Privileges
Click Start, and then type “cmd” into the search box. Right-click the “Command Prompt” result, and then choose the “Run as administrator” command.
5. Input and Execute Following Command
At the Command Prompt, you’ll use the following syntax:
sc delete ServiceName
So, to delete the “RetailDemo” service we’re using in our example, we’d type the following text, and then hit Enter:
sc delete RetailDemo
6. Start Windows Registry Editor
Start Regedit.exe and navigate to the following branch:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServices
7. Delete Service with Help of Regedit.Exe
Each sub-key under the above registry key represents a driver or a Service. The key name is also the short name of the service. Also, you should be able to identify the entry easily by looking at the DisplayName and ImagePath values in the right-pane in the Registry Editor. Find the entry you want to delete. Right-click the appropriate key, and choose Delete. Exit the Registry Editor.
Consider Using Action1 to Delete Windows Service if:
- You need to perform an action on multiple computers simultaneously.
- You have remote employees with computers not connected to your corporate network.
Action1 is a cloud-based platform for patch management, software distribution tools, remote desktop, software and hardware inventory, endpoint management, and reporting.
Have you come across a situation where uninstalling software leaves its Service or driver entries in the registry, and Windows tries to load them at every boot, fails, and logs the error to the System Event log at every startup?
This article tells you how to delete an orphaned service in Windows 10 (and earlier) using the registry, SC.exe command-line, PowerShell, or Autoruns. Before proceeding further, create a System Restore Point and take a complete Registry backup.
If you find that no dependents exist for a service, you can delete the leftover or unwanted Service in Windows using one of the following methods.
Contents
- Delete a Service in Windows
- Method 1: Using the SC.EXE command
- Method 2: Using Autoruns
- Method 3: Using the Registry Editor
- Method 4: Using PowerShell
- Method 5: Using Process Hacker
- INFO: View Dependents of a Service
You can delete a service using the built-in SC.exe command-line, the Registry Editor, PowerShell, or a utility like Autoruns. Follow one of these methods:
Using the SC command
The SC.EXE
command-line tool in Windows can be used to create, edit, or delete Services. To delete a service in Windows, use the following command-line syntax from admin Command Prompt:
sc delete service_name
Where service_name refers to the short name of the service, instead of its display name. To find the short name, open Services MMC and double-click a service.
- Example 1: Google Update Service (
gupdate
) is the display name, andgupdate
is the short name. - Example 2: Dell SupportAssist (
SupportAssistAgent
) is the display name, andSupportAssistAgent
is the short name.
Another way to find the short name of a service is by using this command-line:
sc query type= service | more
The above command lists all the services along with the service (short) name and the display name.
Or, if you know the display name, you can find the service name using this command:
sc getkeyname "service display name"
which in this example is:
sc getkeyname "Google Update Service (gupdate)"
Once the service short name is obtained using any of the above methods, use this command to delete the Service:
sc delete test
You’ll see the output: [SC] DeleteService SUCCESS
This deletes the specified service (“test” service in this example) from the computer.
If the service is running or another process has an open handle to the service, it will be marked for deletion and removed on the next reboot.
Can’t delete a service?
If you receive the following error when deleting the service, it could also be possible that you’re trying to delete a service from a normal Command Prompt instead of an admin Command Prompt.
Should the same error occur in an admin Command Prompt, then it means that the currently logged on user account doesn’t have full control permissions for that service.
[SC] OpenService FAILED 5: Access is denied.
To resolve this error when deleting a service, you need to modify the Service permissions first. Alternatively, you can use the SYSTEM or TrustedInstaller account to delete the service.
Using Autoruns from Windows Sysinternals
Autoruns, from Microsoft Windows Sysinternals, is a must-have tool that helps you manage Windows startup, services, drivers, Winsock providers, Internet Explorer add-ons, Shell extensions, etc.
- Download Autoruns and run it
- From the Options tab, tick Hide Microsoft Entries so that only the third-party entries are listed.
- Press F5 to refresh the listing.
- Click the Services tab to delete the service(s) that are unwanted or leftover.
- Close Autoruns.
Using the Registry Editor
To manually delete a service directly via the Windows Registry, use these steps:
- Start
Regedit.exe
and navigate to the following branch:HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServices
Dell SupportAssist service registry key Each sub-key under the above registry key represents a driver or a Service. The key name is the same as the short name of the service. Also, you should be able to identify the entry easily by looking at the DisplayName and ImagePath values in the right pane in the Registry Editor.
- Find the entry you want to delete.
- Backup the appropriate key by exporting it to a .reg file.
- Once exported, right-click the key, and choose Delete.
- Exit the Registry Editor.
Using PowerShell
From the PowerShell administrator window, you can use the following commands to delete a service.
$service = Get-WmiObject -Class Win32_Service -Filter "Name='servicename'" $service.delete()
ReturnValue of 0
indicates that the operation was successful. The service is deleted and will no longer show up in the Services MMC.
To know the meaning of a return value, check out the Microsoft article Delete method of the Win32_Service class
Or you can run the sc.exe command in PowerShell. That would work too. But you need to specify the extension (sc.exe
) when running it in PowerShell. This is because the command SC
(without mentioning the extension .exe
) will be interpreted as Set-Content
which is a built-in cmdlet in PowerShell.
It’s even easier if you have PowerShell 6.0 installed. In PowerShell 6 and higher, you can use this syntax to remove a service:
Remove-Service -Name ServiceName
Running the Remove-Service
command in older versions of PowerShell (<6.0) shows the error: The term ‘Remove-Service’ is not recognized as the name of a cmdlet, function, script file, or operable program.
Using Process Hacker
Process Hacker is a good process management utility that is similar in appearance to Microsoft’s Process Explorer. With Process Hacker, you can easily delete a service via the right-click menu.
Start Process Hacker as administrator. Switch to the Services tab, right-click on the service you want to remove, and click Delete.
(As a side note, you can also configure service permissions using Process Hacker.)
Download Process Hacker from https://processhacker.sourceforge.io/
View Dependents of a Service
When you remove a service, others that depend upon the service will fail to start, returning the error “System error 1075 has occurred. The dependency service does not exist or has been marked for deletion.”. When a driver or service entry is leftover in the registry, but the corresponding files are missing, the Event Log would record an entry with ID:7000
at every start.
Log Name: System Source: Service Control Manager Date: Event ID: 7000 Level: Error Description: The DgiVecp service failed to start due to the following error: The system cannot find the file specified.
So, it’s advisable first to check if there are any dependents. You can check that in Services MMC by double-clicking on the item you’re going to delete and clicking the Dependencies tab. The list of components that depend on that service is shown below. Here is an example where “Fax” depends on “Print Spooler” to start.
While most third-party services don’t have any dependents, some do. It’s always advisable to take a look at this tab before clearing the item.
Another way to verify the dependents is to run this command from a Command Prompt window. (example, Print Spooler)
sc enumdepend spooler
The information in this article applies to all versions of Windows, including Windows 11.
One small request: If you liked this post, please share this?
One «tiny» share from you would seriously help a lot with the growth of this blog.
Some great suggestions:
- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!
So thank you so much for your support. It won’t take more than 10 seconds of your time. The share buttons are right below.
If you are a fan of tweaking your system and disabling services, you might find that over time your Windows Services list becomes large and unwieldy. It’s easy enough to remove a Windows service using the Command Prompt.
RELATED: Should You Disable Windows Services to Speed Up Your PC?
A big warning, though. When you delete a service, it’s gone—and services can be a real pain to get back. We really don’t recommend deleting services at all, unless you’re dealing with a very particular situation like cleaning up after a program uninstalled improperly or rooting out a malware infestation. Typically, just disabling a service is plenty, especially if all you’re really trying to do is tweak your system performance (which probably won’t work as well as you might hope, anyway). That said, if you do need to delete a service, you just need to find the actual name of that service and then issue a single command from the Command Prompt.
The techniques we’re covering here should work in pretty much any version of Windows—from XP all the way up through Windows 10 or even Windows 11.
Step One: Find the Name of the Service You Want to Delete
The first thing you’ll need to do is identify the full name of the service you want to delete. In our example, we’re using the RetailDemo service—a curious thing that activates a hidden command for changing Windows into a retail service mode (and pretty much erasing all personal docs and resetting your PC to it’s default state), so it’s actually a good example of a service you might not want around.
Hit Start, type “services” into the search box, and then click the “Services” result.
In the “Services” window, scroll down and find the service you’re after. Right-click the service and choose the “Properties” command.
In the service’s properties window, copy (or write down) the text to the right of the “Service name” entry.
When you have the service’s name, you can go ahead and close the properties window and the “Services” window.
Step Two: Delete the Service
Now that you have the name of the service you want to delete, you’ll need to open the Command Prompt with administrative privileges to do the deleting.
Click Start, and then type “cmd” into the search box. Right-click the “Command Prompt” result, and then choose the “Run as administrator” command.
At the Command Prompt, you’ll use the following syntax:
sc delete ServiceName
So, to delete the “RetailDemo” service we’re using in our example, we’d type the following text, and then hit Enter:
sc delete RetailDemo
Note: If the service you’re deleting has any spaces in the name, you’ll have to enclose the name in quotes when you type the command.
Now, if you use the F5 key to refresh your Services list, you’ll see that the service is gone.
Deleting a service in Windows is pretty easy, but we’d again like to caution you to think long and hard before deleting a service, because it’s very difficult to get them back once they’re gone.
READ NEXT
- › 175 Windows 7 Tweaks, Tips, and How-To Articles
- › Stupid Geek Tricks: How to Enable Windows 10’s Hidden Retail Demo Mode
- › The 50 Best Ways to Disable Built-in Windows Features You Don’t Want
- › Get PC Power With Tablet Portability in the Surface Pro 9 for $200 Off
- › How to Screen Record on iPhone
- › This Huge Curved Ultrawide Monitor From LG Is $337 Today
- › PSA: You Can Email Books and Documents to Your Kindle
- › How to Change Your Age on TikTok
How-To Geek is where you turn when you want experts to explain technology. Since we launched in 2006, our articles have been read billions of times. Want to know more?
Содержание
- Удаление служб
- Способ 1: «Командная строка»
- Способ 2: Реестр и файлы служб
- Заключение
- Вопросы и ответы
Службы (сервисы) – это особые приложения, работающие в фоновом режиме и выполняющие различные функции – обновление, обеспечение безопасности и работы сети, включение мультимедийных возможностей и многие другие. Сервисы бывают как встроенными в ОС, так и могут быть установлены извне пакетами драйверов или софтом, а в некоторых случаях и вирусами. В этой статье мы расскажем, как удалить службу в «десятке».
Удаление служб
Необходимость выполнить данную процедуру обычно возникают при некорректной деинсталляции некоторых программ, добавляющих свои службы в систему. Такой «хвост» может создавать конфликты, вызывать различные ошибки или продолжать свою работу, производя действия, приводящие к изменениям параметров или файлов ОС. Довольно часто подобные сервисы появляются во время вирусной атаки, а после удаления вредителя остаются на диске. Далее мы рассмотрим два способа их удаления.
Способ 1: «Командная строка»
В нормальных условиях решить поставленную задачу можно с помощью консольной утилиты sc.exe, которая предназначена для управления системными службами. Для того чтобы дать ей правильную команду, сначала необходимо выяснить имя сервиса.
- Обращаемся к системному поиску, нажав на значок лупы возле кнопки «Пуск». Начинаем писать слово «Службы», а после того, как появится выдача, переходим к классическому приложению с соответствующим названием.
- Ищем целевой сервис в списке и кликаем дважды по его названию.
- Имя располагается в верхней части окна. Оно уже выделено, так что можно просто скопировать строку в буфер обмена.
- Если служба запущена, то ее нужно остановить. Иногда сделать это невозможно, в таком случае просто переходим к следующему шагу.
- Закрываем все окна и запускаем «Командную строку» от имени администратора.
Подробнее: Открытие командной строки в Windows 10
- Вводим команду для удаления с помощью sc.exe и жмем ENTER.
sc delete PSEXESVC
PSEXESVC – имя сервиса, которое мы скопировали в пункте 3. Вставить его в консоль можно, нажав в ней правую кнопку мыши. Об успешном выполнении операции нам скажет соответствующее сообщение в консоли.
На этом процедура удаления завершена. Изменения вступят в силу после перезагрузки системы.
Способ 2: Реестр и файлы служб
Случаются ситуации, когда невозможно удалить сервис приведенным выше способом: отсутствие такового в оснастке «Службы» или отказ при выполнении операции в консоли. Здесь нам поможет ручное удаление как самого файла, так и его упоминания в системном реестре.
- Снова обращаемся к системному поиску, но на этот раз пишем «Реестр» и открываем редактор.
- Переходим в ветку
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServices
Ищем папку с тем же названием, что и наша служба.
- Смотрим на параметр
ImagePath
Он содержит путь к файлу службы (%SystemRoot% — это переменная среды, указывающая путь к папке
«Windows»
, то есть«C:Windows»
. В вашем случае буква диска может быть другая).Читайте также: Переменные среды в Windows 10
- Переходим по этому адресу и удаляем соответствующий файл (PSEXESVC.exe).
Если файл не удаляется, попробуйте сделать это в «Безопасном режиме», а в случае неудачи ознакомьтесь со статьей по ссылке ниже. Также почитайте комментарии к ней: там приведен еще один нестандартный способ.
Подробнее:
Как зайти в безопасный режим на Windows 10
Удаляем неудаляемые файлы с жесткого дискаЕсли файл не отображается по указанному пути, возможно, он имеет атрибут «Скрытый» и (или) «Системный». Для отображения таких ресурсов нажимаем кнопку «Параметры» на вкладке «Вид» в меню любой директории и выбираем «Изменить параметры папок и поиска».
Здесь, в разделе «Вид» снимаем галку возле пункта, скрывающего системные файлы, и переключаемся на отображение скрытых папок. Жмем «Применить».
- После того, как файл будет удален, или не найден (такое бывает), или путь к нему не указан, возвращаемся в редактор реестра и целиком удаляем папку с именем службы (ПКМ – «Удалить»).
Система спросит, действительно ли мы хотим выполнить данную процедуру. Подтверждаем.
- Перезагружаем компьютер.
Заключение
Некоторые службы и их файлы после удаления и перезагрузки появляются снова. Это говорит либо об их автоматическом создании самой системой, либо о действии вируса. Если имеется подозрение на заражение, проверьте ПК специальными антивирусными утилитами, а лучше обратитесь к специалистам на профильных ресурсах.
Подробнее: Борьба с компьютерными вирусами
Прежде чем удалять сервис, убедитесь, что он не является системным, так как его отсутствие может значительно повлиять на работу Windows или привести к полному ее отказу.
Еще статьи по данной теме:
Помогла ли Вам статья?
I would like to do this because I have a half installed service because of installation failure which is just there, non-functioning.
How can I delete the Windows service using the command line?
random♦
14.4k9 gold badges53 silver badges58 bronze badges
asked Apr 28, 2010 at 10:56
1
NOTE: You’ll likely need an elevated command prompt (right click => «Run as Administrator») to execute this command
the sc
command is what you want, specifically sc delete
C:UsersJeff>sc delete DESCRIPTION: Deletes a service entry from the registry. If the service is running, or another process has an open handle to the service, the service is simply marked for deletion. USAGE: sc delete [service name]
answered Apr 28, 2010 at 11:00
Jeff AtwoodJeff Atwood
23.7k30 gold badges98 silver badges120 bronze badges
1
We need to stop the service before deleting it from the Registry:
sc stop [Service name]
sc delete [service name]
Run Command prompt as an administrator and execute above commands.
Enclose the service name in double quotes if it contains spaces.
answered Feb 3, 2015 at 4:23
CSharpCSharp
2412 silver badges4 bronze badges
1
Simply put quotation marks between any service name that contain spaces
C:WINDOWSsystem32>sc delete «Your Ugly Service»
answered May 11, 2018 at 13:58
1