Disable windows services in Windows 10 command prompt in recovery mode
Editing the Registry offline
You need to use Regedit.exe
and load the System hive located at:
<driveletter>:\Windows\System32\config\SYSTEM
When in recovery environment, the drive-letter for your Windows installation would be different. Use Bcdedit.exe
to find it out.
(For more information on editing registry offline: How to Edit the Registry Offline Using Windows Recovery Environment)
Changing the Service Startup type
(Refer How to Disable a Service or Device That Prevents NT from Booting - The article was originally written for Windows 2000, but still applies to all versions of Windows.)
Once in the Command Prompt window, type Regedit.exe
and select HKEY_LOCAL_MACHINE
(or HKEY_USERS
). From the File menu, click Load Hive.. and load the SYSTEM
hive of your Windows installation. Name the loaded hive as TEST
Go to the following registry key:
HKEY_LOCAL_MACHINE\TEST\ControlSet001\Services\<short name of the service>
Service startup Registry keys
To disable a service, change the value of Start
REG_DWORD to 0x4.
Automatic 0X2
Manual 0x3
Disabled 0x4
After making changes to the service registry key, select the hive named TEST
and unload it (via File menu) and exit Regedit.exe.
Related videos on Youtube
Comments
-
Maxim V. Pavlov over 1 year
Is used to be able to reboot Windows into command prompt to use sc config "Service" start= disabled
In Windows 10, if I reboot to command prompty and login as admin, an attempt to do the same will give me sc command or program is not found.
How can I set service state to disabled in command prompt in Windows 10.
Thank you.
-
arana almost 8 yearsI have not tried that booting into recovery mode, but looks like sc command is not in the path when booting in this mode, try to cd to \windows\system32 and runing it from there.
-
Maxim V. Pavlov almost 8 years@arana, the starting point of cmd in recovery is in fact \windows\system32, and sc isn't found there. Nor is sc.exe
-
-
Scott Chamberlain almost 8 yearsX is actually a bad letter to choose for a example, when you boot in to a windows PE environment it uses X by default for the instance of windows that is running.
-
w32sh almost 8 yearsCorrect! I've removed reference to X:\
-
Maxim V. Pavlov almost 8 yearsThis is the correct answer. Although there is not service I need in CurrentControlSet1, which is the only one available when I load it in PE. In normal Windows start, I have CurrentControlSet, and it lists the service I need to disable.
-
Maxim V. Pavlov almost 8 yearsA clarification, in PXE I have current control set available, but neither it, nor ControlSet001 lists the service I need to have disabled. Any ideas would be helpful.