- Delete method of the Win32_Service class (Remote Desktop Services)
- Syntax
- Parameters
- Return value
- Remarks
- Examples
- sc.exe удалить sc.exe delete
- Синтаксис Syntax
- Параметры Parameters
- Примеры Examples
- How to Remove Services in Windows 10
- Option 1 – Command
- Option 2 – Registry
- You Might Also Like
- Reader Interactions
- Comments
- Did this help? Let us know! Cancel reply
- Как удалить службу Windows 7 и 8
- Удаление служб Windows в командной строке
- С помощью редактора реестра
Delete method of the Win32_Service class (Remote Desktop Services)
The Delete WMI class method deletes an existing service.
This topic uses Managed Object Format (MOF) syntax. For more information about using this method, see Calling a Method.
Syntax
Parameters
This method has no parameters.
Return value
Returns one of the values listed in the following list or any other value to indicate an error. For additional error codes, see WMI Error Constants or WbemErrorEnum. For general HRESULT values, see System Error Codes.
0
The request was accepted.
1
The request is not supported.
2
The user did not have the necessary access.
3
The service cannot be stopped because other services that are running are dependent on it.
4
The requested control code is not valid, or it is unacceptable to the service.
5
The requested control code cannot be sent to the service because the state of the service (Win32_BaseService.State property) is equal to 0, 1, or 2.
6
The service has not been started.
7
The service did not respond to the start request in a timely fashion.
8
Unknown failure when starting the service.
9
The directory path to the service executable file was not found.
10
The service is already running.
11
The database to add a new service is locked.
12
A dependency this service relies on has been removed from the system.
13
The service failed to find the service needed from a dependent service.
14
The service has been disabled from the system.
15
The service does not have the correct authentication to run on the system.
16
This service is being removed from the system.
17
The service has no execution thread.
18
The service has circular dependencies when it starts.
19
A service is running under the same name.
20
The service name has invalid characters.
21
Invalid parameters have been passed to the service.
22
The account under which this service runs is either invalid or lacks the permissions to run the service.
23
The service exists in the database of services available from the system.
24
The service is currently paused in the system.
Remarks
As your organization changes, you might decide to remove certain services from certain computers. In-house and third-party services can be removed by using WMI, while operating system services can be removed by using Sysocmgr.exe.
When preparing to remove services, keep the following information in mind:
Services must be stopped before you remove them. If the service is running when you issue the delete command, the service is marked for deletion, but it continues to run until it stops and all open handles are closed.
If the service is never stopped, that service will never be deleted.
Removing a service does not remove the service’s executable file.
Removing a service by using WMI deletes the related registry entries under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services. As a result, the service is no longer installed and is not available through the Services snap-in. However, WMI does not delete the executable file, meaning you could easily reinstall the service. To delete the executable file, you must retrieve the path name and then delete the file.
Removing a base Windows 2000 service (for example, DHCP) by using WMI deletes the registry entries for that service but does not remove the shortcut from the Administrative Tools menu or remove the service from the Windows Components Wizard. This can confuse anyone trying to determine how the computer has been configured.
For example, if you remove the DHCP service by using a WMI script, the DHCP service is no longer listed in the Services snap-in. However, a nonfunctioning shortcut to the DHCP console remains in the Administrative Tools menu, and if you start the Windows Component Wizard, it indicates that the DHCP service is installed.
Because of this, you should always use Sysocmgr.exe to programmatically remove Windows 2000 services.
Examples
The following VBScript code sample describes how to delete a service.
The following Perl code sample describes how to delete a service.
sc.exe удалить sc.exe delete
Удаляет подраздел службы из реестра. Deletes a service subkey from the registry. Если служба запущена или другой процесс имеет открытый обработчик, служба помечается для удаления. If the service is running or if another process has an open handle to the service, the service is marked for deletion.
Мы не рекомендуем использовать эту команду для удаления встроенных служб операционной системы, таких как DHCP, DNS или службы IIS. We don’t recommend you to use this command to delete built-in operating system services such as DHCP, DNS, or Internet Information Services. Сведения об установке, удалении и перенастройке ролей операционной системы, служб и компонентов см. в разделе Установка и удаление ролей, служб ролей или компонентов . To install, remove, or reconfigure operating system roles, services and components, see Install or Uninstall Roles, Role Services, or Features
Синтаксис Syntax
Параметры Parameters
Параметр Parameter | Описание Description |
---|---|
Указывает имя удаленного сервера, на котором расположена служба. Specifies the name of the remote server on which the service is located. Имя должно использовать формат UNC (например, \ MyServer). The name must use the Universal Naming Convention (UNC) format (for example, \myserver). Чтобы запустить SC.exe локально, не используйте этот параметр. To run SC.exe locally, don’t use this parameter. | |
Указывает имя службы, возвращенное операцией жеткэйнаме . Specifies the service name returned by the getkeyname operation. | |
/? /? | Отображение справки в командной строке. Displays help at the command prompt. |
Примеры Examples
Чтобы удалить подраздел Service невсерв из реестра на локальном компьютере, введите: To delete the service subkey NewServ from the registry on the local computer, type:
How to Remove Services in Windows 10
By Mitch Bartlett 11 Comments
Remove services from the list in the services.msc utility in Microsoft Windows with one of these two options.
Option 1 – Command
- You can also remove services using a command line. Hold down the Windows Key, then press “R” to bring up the Run dialog.
- Type “SC DELETE servicename“, then press “Enter“.
“servicename” should be the exact name of the service.
Option 2 – Registry
- Hold down the Windows Key and press “R“.
- Type “regedit“, then select “OK“.
- Navigate to the following location in the registry:
- HKEY_LOCAL_MACHINE
- System
- CurrentControlSet
- Services
- There are folders under “Services” that contain each service. The “DisplayName” values in each of these folders equals the Service Name. Go through the list or use the “Edit” > “Find” menu to search for the service you wish to remove.
These steps only delete the name of the service. How do I delete the actual program that is running as a service?
You can track it down with these steps:
- Right-click the taskbar and choose “Task Manager“.
- Select the “Services” tab.
- Right-click the service you wish to delete, then choose “Go to details“.
- The process related to the service is highlighted. If you wish to remove it, you can track it down by right-clicking it and selecting “Open file location“. From there, either uninstall the related program from “Add/Remove Programs” or delete the EXE file as desired.
You Might Also Like
Filed Under: Windows Tagged With: Windows 10
Reader Interactions
Comments
Rishu kumar dubey says
nothing worked for me as above
for me, the solution was
1. Get the service name, services.msc or taskmanager > services may be the point from where to get the servicename.
2. Open command prompt as admin
3. Use the command: SC DELETE “ServiceName”
4. Press Enter or Ok
Now can check if it is deleted or not with below
All data system services delete and cancel network sharing information system services all media reports that and application data all delete and cancel all like and comment and post and sharing information data all covid 19 and cancel delete
Surjit Dadhwal says
SC DELETE ServiceName did not worked for me. Few points that might be helpful:
1) Use double quotes around ServiceName. So SC DELETE “ServiceName”
2) If 1 does not work then use .exe with SC. So SC.exe DELETE “ServiceName”
Number 2 worked for me.
Maybe take a look here if you are stuck with deleting the service:
Juho Leiniö says
Thanks a ton! The option 1 worked for me.
Thanks! it works for me!
Command –> SC DELETE “ServiceName” binPath= “C:\Program Files (x86)\XXX\ServiceName.exe -c Service.config”
Run the command prompt as administrator:
click start -> search for cmd -> right click -> choose “run as administrator
then run the command in step 1, this worked for me on windows 10
2 one worked.Thanks a lot.
Larry Kavounas says
Friends, this is very helpful! I learned a lot!
Can you please finish the option #2:
Once I find the entry in the registry, what do I do?
I imagine right-mouse-click on the yellow folder and delete?
can you please confirm?
Thanks
Larry
no , i tried both tricks, and both failed.
I first tried the RUN command, and nothing happened, the services were still being shown up on Service Applet listing.
Then i tried the registry trick, but still the service is still being shown on the services applet list., although this time the description given in the services list applet has changed to “Failed to load description. Error code 2”
With the registry trick only its description is lost, service is still on the list
(NB: i have stopped the services before trying these tricks)
Did this help? Let us know! Cancel reply
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Как удалить службу Windows 7 и 8
Кроме отключения служб, вы можете и удалить ненужные службы. В этой инструкции речь пойдет о Windows 8.1 и 7, есть отдельный материал: Как удалить службу Windows 10. Ранее я писал пару статей на тему отключения ненужных в определенных ситуациях служб Windows 7 или 8:
В этой статье покажу, как можно не только отключить, но и удалить службы Windows. Это может пригодиться в разных ситуациях, наиболее распространенные среди них — службы остаются после удаления программы, к которой они относятся или же являются частью потенциально нежелательного ПО.
Примечание: не стоит удалять службы, если вы точно не знаете, что и для чего делаете. Особенно это касается системных служб Windows.
Удаление служб Windows в командной строке
В первом способе будем использовать командную строку и имя службы. Для начала зайдите в Панель управления — Администрирование — Службы (можно также нажать Win + R и ввести services.msc) и найдите службу, которую нужно удалить.
Дважды кликните по имени службы в списке и в открывшемся окне свойств обратите внимание на пункт «Имя службы», выделите и скопируйте его в буфер обмена (можно сделать правым кликом мыши).
Следующим шагом запустите командную строку от имени Администратора (в Windows 8 и 10 это можно сделать с помощью меню, вызываемого клавишами Win + X, в Windows 7 — найдя в стандартных программах командную строку и вызвав контекстное меню правым кликом мыши).
В командной строке введите sc delete имя_службы и нажмите Enter (имя службы можно вставить из буфера обмена, куда мы его скопировали на предыдущем шаге). Если имя службы состоит более чем из одного слова, возьмите его в кавычки (набранные в английской раскладке).
Если вы увидите сообщение с текстом Success, значит служба была удалена успешно и, обновив список служб, вы сможете в этом убедиться сами.
С помощью редактора реестра
Удалить службу Windows можно также и с помощью редактора реестра, для запуска которого используйте комбинацию клавиш Win + R и команду regedit.
- В редакторе реестра перейдите к разделу HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services
- Найдите подраздел, имя которого совпадает с именем службы, которую нужно удалить (для того, чтобы узнать имя, используйте способ, описанный выше).
- Кликните правой кнопкой мыши по имени и выберите пункт «Удалить»
- Закройте редактор реестра.
После этого, для окончательного удаления службы (чтобы она не отображалась в списке) следует перезагрузить компьютер. Готово.
Надеюсь, статья будет полезна, а если она таковой оказалась, прошу поделиться в комментариях: почему вам потребовалось удалять службы?
А вдруг и это будет интересно:
Почему бы не подписаться?
Рассылка новых, иногда интересных и полезных, материалов сайта remontka.pro. Никакой рекламы и бесплатная компьютерная помощь подписчикам от автора. Другие способы подписки (ВК, Одноклассники, Телеграм, Facebook, Twitter, Youtube, Яндекс.Дзен)
27.01.2016 в 09:44
спс за помошь служба удалена! после скачивания просто торрента я получил неизвестные программы — и разузнав понял, что это программа шпион, после неудачных попыток удаления разными антивирусами и антишпионами= я подумал сделать это вручную. файлы с ником этой программы никак не удалялись — позже посмотрев Диспетчер задач я нашел ник проги в отделе Служб!
через диспетчер остановить службу было нельзя — все время отказ в доступе.
после зашел в службы и остановил оттуда, но все равно не хотелось хранить вредоносную службу на компе = и захотел удалить! спс за помощь.
01.09.2016 в 23:39
Служба ADSkipSvc, мешала работе в браузере. Постоянно выскакивала всякая ненужная мне реклама. Я нашел эту службу, но не знал как с ней справится. Все что я пробовал не давало результатов, она все время автоматически включалась. А теперь через реестр удалось удалить. Большое Вам спасибо!
14.10.2016 в 15:06
Спасибо огромное! буду теперь знать, а то куча хвостов висит в списке, толку что отключены, если создают толпу всё равно
17.01.2018 в 15:29
Надеюсь, статья будет полезна, а если она таковой оказалась, прошу поделиться в комментариях: почему вам потребовалось удалять службы?
Надеюсь вы не забаните.
Яндекс браузер при установке прописывает себя в службах и без ведома пользователя лезет в интернет — передаёт сайту Яндекс всю инфу о системе, о пользователе и о работе браузера при запуске виндовс через svchost.exe!
А потом уже при запуске Яндекс браузера, он уже лезет в интернет без ведома пользователя и отправляет туда всю инфу о пользователе.
Так работают все браузеры, но некоторые себя не прописывают в службах.
С помощью блокировки адресов можно ЗАЩИТИТЬСЯ от несанкционированного отсыла информации.
Адреса, явки, пароли, порты — через 443 порт при службе и через другие порты и адреса, во время выхода пользователя в интернет!
213.180.193.82:443
93.158.134.82:443
213.180.204.82:443
93.158.134.82:443
87.250.250.82:443
87.250.251.82:443
87.250.250.33:443
20.02.2018 в 15:15
Ну клоунские разрабы вроде Яндекса на ето могут, не зря же они пол года(или скок там) по телику свой мусор рекламировали… да и вообще Хром, Яндекс и прочая муть — один мусор, поставь Белку и будет тебе жизнь нормальна
17.01.2020 в 00:10
А подробную инструкцию как заблокировать можно?
21.03.2020 в 12:55
А Google не создаёт шифрованные каналы и не копирует данные?
А мозила, а майл… и все остальные…
Нет-нет, конечно же, они таким не занимаются, они все из себя такие замечательные. И все как один, стоят на страже ваших активов….,
Да? Или нет?
А компания MS и их ПО — это вообще дар божий во плоти. Ведь безопасность личных данных пользователей, для них превыше всего… и штатовский нацбез это очень высоко ценит…
У яндекса все данные передаются через зашифрованный канал, это сделано для безопасной передачи данных.
Все нормальные конторы осуществляют передачу своих данных по шифрованному трафику.
24.01.2018 в 12:12
Огромное спасибо! у моего сотрудника проблемы с ноутом, — после обновлений семерки слетают драйвера сетевой карты и ему приходиться сидеть без инета. Мне пришлось остановить центр обновлений, но в интернете советуют еще удалить службу bits. буду пробовать!
02.03.2018 в 20:31
Вирус майнинга перезапускался и сам себя восстанавливал. Благодарочка!
12.03.2018 в 22:39
Дмитрий а можно как-то остановит службы через реестр? У меня после обновления не отключается брэндмауер и служба базовой фильтрации, и еще появилась новая «служба центра безопасности защитника виндовс».
13.03.2018 в 09:14
Здравствуйте.
Типы запуска и другие параметры для служб находятся в разделе HKEY_LOCAL_MACHINE \System \CurrentControlSet \Services
Там для каждой службы есть параметр Start и он определяет тип запуска. Значение 4 = отключена.