Last active
October 28, 2015 00:14
-
-
Save UVLabs/d1bb106621d4c16f18da to your computer and use it in GitHub Desktop.
Auto restore point script for windows 7 and up
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If WScript.Arguments.Count = 0 Then | |
Set oShell = CreateObject("Shell.Application") | |
oShell.ShellExecute "wscript.exe", """" & WScript.ScriptFullName & """ Run", , "runas", 1 | |
Else | |
Set oWshShell = WScript.CreateObject("WScript.Shell") | |
oWshShell.Popup "Creating a SystemRestore point. Please wait.", 2, "System Restore", 0 | |
swinmgmts = "winmgmts:\\.\root\default:Systemrestore" | |
GetObject(swinmgmts).CreateRestorePoint "Scheduled Restore Point", 0, 100 | |
MsgBox "System Restore Point created", 0, "System Restore" | |
End If |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment