Windows XP Cookbook (Cookbooks)

Problem

You want to disable all, or portions of, System Restore remotely to save disk space, reduce user confusion, or eliminate the possibility of users restoring previous configurations mistakenly.

Solution

Using Group Policy

Enable the "Turn off System Restore" GPO setting under Computer Configuration\ Administrative Templates\System\System Restore.

You can also elect to turn off just the configuration panel (and leave the actual System Restore functionality intact) by enabling the "Turn off Configuration" GPO setting in the same location.

Using VBScript

' This code disables System Restore. ' ------ SCRIPT CONFIGURATION ------ strComputer = "<ComputerName>" ' ------ END CONFIGURATION --------- set objWmi = GetObject("winmgmts://" & strComputer & _ "/root/default:SystemRestore") objWmi.Disable("") WScript.Echo "System Restore disabled"

Discussion

If you choose to use the Group Policy and disable the "Turn off System Restore" setting, System Restore will be turned on for all systems to which that GPO applies, and it's enforced meaning that users will be unable to turn it off.

See Also

Recipe 19.5 for more on using System Restore

Категории