Jump to content

Scripting System Restore On or Off


anguilla

Recommended Posts

I recently decided to update my RIS image to include scripting apps & applying Office patches to those apps. This is all done via cmd file but had an issue in that CMDOW.exe is treated as Malware by SAV and as some of the installs create a system restore point I need to prevent this file going into System Restore.

Having looked on this board, I could not find anything that would actually turn System restore off and then turn it back off again so I ended up writing my own reg files to do this so initially I turn System Restore off - install everything and then just before final reboot - turn it back on again. This can be used to action remotely as oppossed to other scripts that just hide the system restore box

Disable System Restore:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore]
"DisableSR"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\sr\Parameters]
"FirstRun"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\sr\Parameters]
"FirstRun"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\sr]
"Start"=dword:00000004

Enable System Restore:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore]
"DisableSR"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\sr\Parameters]
"FirstRun"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\sr\Parameters]
"FirstRun"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\sr]
"Start"=dword:00000000

I hope this helps someone having to avoid doing from scratch :)

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...