≡ Menu

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  

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

8 comments… add one
  • Anonymous

    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

  • Techblogger

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

  • Sean

    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…

  • Mark

    Yes. In Windows 7 it gives this error:

    The service name is invalid.
    More help is available by typing NET HELPMSG 2185.
    • Anonymos

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

  • thanks so much

    thanks very much. helped.

  • Christin

    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:\”

    – 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

Leave a Comment