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
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore
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.
sc config srservice start= disabled
To enable system restore service from command line you can run the below command.
sc config srservice start= Auto
(or)
sc config srservice start= demand
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.
net stop srservice
To start system restore service from command line we can run the below command.
net start srservice
Related posts:
Run command for System restore
{ 5 comments… read them below or add one }
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: