Skip to content

Instantly share code, notes, and snippets.

@duncansmart
Created December 6, 2012 08:06
Show Gist options
  • Save duncansmart/4222661 to your computer and use it in GitHub Desktop.
Save duncansmart/4222661 to your computer and use it in GitHub Desktop.
Create System Restore Point (Windows)
// call with %systemroot%\System32\cscript.exe, schedule with Task Scheduler
var systemRestore = GetObject("winmgmts:\\\\.\\root\\Default:SystemRestore")
var result = systemRestore.CreateRestorePoint("Scheduled restore point", 0, 100)
WScript.Echo("result " + result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment