Disabling windows service command line

Enable disable system restore and service from command line

We can enable or disable system restore from Windows command line by modifying the relevant registry keys. We can also configure system restore service from command prompt using sc command.

Disable System Restore from Windows command line

We can disable system restore by setting the registry key DisableSR to1 under the node В

From Windows command line we can edit this registry key by running the following command.

Reg add «HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore» /v DisableSR /t REG_DWORD /d 1 /f

To enable System restore from command line you can run the below command:

Reg add «HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore» /v DisableSR /t REG_DWORD /d 0 /f

Disable System restore service from command line

We can disable system restore service from command line using the below command.

To enable system restore service from command line you can run the below command.

Note that the above commands do not change the current running status of the system restore service. If the service is running currently, disabling the service won’t stop it in the current session, but when the system is restarted this service won’t be started.

To stop system restore service from command line we can run the below command.

To start system restore service from command line we can run the below command.

Thanks for the useful information.
But,there are some mistakes, please correct.

> /v DisableCR /d 1 /f
в†’ /v DisableSR /t REG_DWORD /d 1 /f

Corrected the post..thanks for letting me know..

I tried all of the above, but it said my system restore wasn’t running. I looked in services.msc and noticed there was no line for system restore. Do I have to insert something in services for system restore to start in the first place? Thanks.

Can’t wail until I buy a Mac…

Sean,
This post applies to XP only. Looks like you are using Windows 7/Vista. Please check this link for questions on Win7 system restore.
http://windows.microsoft.com/en-US/windows-vista/System-Restore-frequently-asked-questions

Yes. In Windows 7 it gives this error:

Does both “sc config srservice start= disabled” & “net stop srservice” cmd code work on win 7?

thanks very much. helped.

In Windows 10, and maybe in Windows Vista and Windows 7.
System Properties > System Protection > Restore Settings.

– Turn on system protection.

In DOS (wmic doesn’t work in PowerShell) : wmic /namespace:\\root\default Path SystemRestore Call enable “C:\”
In PowerShell : Enable-ComputerRestore “C:\”

Читайте также:  Центр сертификации windows выпуск сертификата

– Disable system protection.

In DOS (wmic doesn’t work in PowerShell) : wmic /namespace:\\root\default Path SystemRestore Call disable “C:\”
In PowerShell : Disable-ComputerRestore “C:\”

– Resizes the maximum amount of storage space that can be used for shadow copy storage.

In DOS and PowerShell : vssadmin resize shadowstorage /for=C: /on=C: /maxsize=10%

– Deletes all of the shadow copies.

In DOS and PowerShell : vssadmin delete shadows /all /quiet
Command line equivalent in DOS : wmic shadowcopy delete

Start or stop Windows service from command line (CMD)

We normally use Services.msc to start or stop or disable or enable any service. We can do the same from windows command line also using net and sc utilities. Below are commands for controlling the operation of a service.

Command to stop a service:

To start a service:

You need to have administrator privileges to run net start/stop commands. If you are just a normal user on the computer, you would get an error like below.

To disable a service:

To enable a service:

To make a service start automatically with system boot:

Note: Space is mandatory after ‘=’ in the above sc commands.

This SC command works on a Windows 7 machine and also on the down-level editions of Windows i.e Windows XP/2003 and Windows Vista. Again, if you do not have administrator previliges you would get the below error.

Note that the service name is not the display name of a service. Each service is given a unique identification name which can be used with net or sc commands. For example, Remote procedure call (RPC) is the display name of the service. But the service name we need to use in the above commands is RpcSs.
So to start Remote procedure call service the command is:

These service names are listed below for each service. The first column shows the display name of a service and the second column shows the service name that should be used in net start or net stop or sc config commands.

Отключить службу Windows из командной строки

Я хочу отключить службу Windows, но я не хочу:

  1. Откройте консоль управления» Services»
  2. выделите имя сервиса
  3. щелкните правой кнопкой мыши Свойства (или дважды щелкните)
  4. изменить тип запуска: отключено
  5. применить
  6. Нажмите Кнопку «Стоп»

Я не хочу удалить службу Windows но вместо этого, просто отключите его.

4 ответов

пробел после » start= » важно

вы можете увидеть имя службы, дважды щелкнув службу на экране службы:

В дополнение к ответу Кевина, если вам нужно контролировать более одной службы, или выбрать их на основе некоторых критериев, вы можете использовать wmic . Простое использование, чтобы остановить только 1 службу (Sqlwriter в моем примере) будет:
wmic service where name=’SQLWriter’ call ChangeStartmode Disabled

Читайте также:  Как удалить windows dvd maker

но инструмент гораздо мощнее, например, чтобы установить отключенный режим для всех служб с подписью, начиная с SQL, а не уже отключен, вы могли бы сказать:

SC CONFIG » » START= ( BOOT или SYSTEM или AUTO или DEMAND или DISABLED или DELAYED-AUTO )

Reg.exe утилита из Microsoft Windows NT Resource Kit должна быть устанавливается на ваш компьютер.

изменение значения запуска службы на локальном компьютере с помощью в командной строке введите в командной строке следующую команду, а затем нажмите ENTER: REG UPDATE В HKLM\система\CurrentControlSet на\услуги\имя_службы\пуск=X, где servicename-это имя службы, отображаемое в реестр и X является либо 2, 3, или 4 (представляющий автоматический запуск, ручной запуск или отключен, соответственно).

изменение значения запуска службы на удаленном компьютере с помощью используя командную строку локально, введите следующую команду подскажите и нажмите ENTER: REG UPDATE Системы\реестра HKLM\CurrentControlSet на\услуги\имя_службы\пуск=Х \имя_сервера, где имя_службы — имя службы отображается в реестре, X является либо 2, 3 или 4 (представляющий автоматический запуск, ручной запуск, или отключен, соответственно), и servername-имя удаленного сервера.

чтобы увидеть, как имя службы в реестре, просмотреть следующий раздел реестра: Система реестра HKEY_LOCAL_MACHINE\\CurrentControlSet на\услуги\

Отключение Windows Insider Service

Все устройства с Windows 10 поставляются с Windows Insider Service (wisvc), независимо от участия пользователей; он будет продолжать работать в фоновом режиме для программы предварительной оценки Windows. Программа Windows Insider — это платформа для тестирования с открытым исходным кодом, которая позволяет лицензированному пользователю получить предварительную сборку операционных систем. В большинстве случаев эта услуга считается бесполезной для пользователей, которые не хотят участвовать в программе Insider. Короче говоря, ненужные службы, работающие в фоновом режиме, снизят общую производительность вашего устройства. В этой статье будут показаны различные шаги по отключению службы предварительной оценки Windows на вашем устройстве с Windows 10.

Как отключить Windows Insider Service?

Этого можно добиться тремя способами, как указано ниже:

  1. Через консоль служб
  2. Через командную строку
  3. Через PowerShell

Отключите Windows Insider Service через консоль служб:

В этом методе мы проведем вас через шаги по отключению службы предварительной оценки Windows с помощью консоли служб . Пожалуйста, выполните следующие шаги,

  • Нажмите клавишу « Win + R » на клавиатуре, чтобы открыть диалоговое окно «Выполнить».
  • Затем введите «services.msc» и нажмите клавишу ввода, чтобы открыть консоль служб.
  • Теперь прокрутите правый раздел и найдите « Служба предварительной оценки Windows.
  • Затем дважды щелкните запись, чтобы открыть окно свойств.
  • Перейдите на вкладку «Общие» , затем выберите параметр « Отключено » в раскрывающемся списке «Тип запуска» .
  • Нажмите Применить, а затем кнопку ОК, чтобы сохранить изменения.

Теперь вы можете закрыть консоль служб.

Отключите Windows Insider Service через командную строку:

  • Нажмите клавишу « Win + R» на клавиатуре, чтобы открыть диалоговое окно «Выполнить».
  • Затем введите « cmd » и одновременно нажмите клавиши « CTRL + SHIFT + ENTER», чтобы открыть командную строку с повышенными привилегиями.
  • В командной строке введите следующую команду и нажмите клавишу ввода.
Читайте также:  Удалить mac os оставить windows


Вы получите следующее сообщение:

Вот и все. Вы только что отключили Windows Insider Service с помощью командной строки с повышенными привилегиями.

Отключите Windows Insider Service через PowerShell:

Последний метод проведет вас через шаги по отключению службы с помощью PowerShell. Пожалуйста, выполните следующие шаги,

  • Нажмите клавишу « Win + X », чтобы открыть меню опытного пользователя.
  • Затем нажмите «A» на клавиатуре, чтобы открыть PowerShell в повышенном режиме.
  • В консоли введите следующую команду и нажмите клавишу ввода.

Вывод:

В этой статье показано три разных способа отключить службу предварительной оценки Windows на вашем устройстве с Windows 10. Если вы столкнетесь с трудностями при выполнении любого из шагов, упомянутых выше, оставьте комментарий ниже.

Disable a Windows service from the command line

I want to disable a Windows service but I don’t want to:

  1. Open the «Services» management console
  2. Scroll to the name of the service
  3. Right-click Properties (or double-click)
  4. Change the Startup Type: to disabled
  5. Apply
  6. Click «Stop»

I don’t want to remove a Windows service but instead, just disable it.

4 Answers 4

The space after the » start= » is important

You can see service name by double clicking a service on Services screen:

In addition to Kevin’s answer, if you need to control more than one service, or select them based on some criteria, you can use wmic . Simple use to stop only 1 service (Sqlwriter in my example) would be:
wmic service where name=’SQLWriter’ call ChangeStartmode Disabled

but the tool is much more powerful, for example to set disabled mode for all services with caption starting with SQL and not already disabled you could say:

SC CONFIG » » START= ( BOOT , or SYSTEM , or AUTO , or DEMAND , or DISABLED , or DELAYED-AUTO )

The Reg.exe utility from the Microsoft Windows NT Resource Kit must be installed on your computer.

To change the startup value for a service on a local computer by using the command line, type the following at the command prompt and then press ENTER: REG UPDATE HKLM\SYSTEM\CurrentControlSet\Services\servicename\Start=X where servicename is the name of the service as it appears in the registry and X is either a 2, a 3, or a 4 (representing automatic startup, manual startup, or disabled, respectively).

To change the startup value for a service on a remote computer by using the command line locally, type the following at the command prompt and press ENTER: REG UPDATE HKLM\SYSTEM\CurrentControlSet\Services\servicename\Start=X \servername where servicename is the name of the service as it appears in the registry, X is either a 2, a 3, or a 4 (representing automatic startup, manual startup, or disabled, respectively), and servername is the name of the remote server.

To see how the service name appears in the registry, view the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\

Оцените статью