Windows – Turn off system restore via the command line in Windows 7

command linesystem-restorewindows 7

I'm trying to turn off system restore via the command line.

This is the command I'm using:

Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" /V DisableSR /t REG_DWORD /d 1 /f

Then I run it as an administrator, and it says that the command completed successfully, but when I go to Computer -> Properties -> System Protection it still shows that system restore is on for the drive.

Is there an additional step or a different command?

Best Answer

You can do it from PowerShell (run as Administrator):

disable-computerrestore -drive "C:\"

See http://technet.microsoft.com/en-us/library/dd347710.aspx