This is my first visit here... what a groovy place!
I got two vb scripts that set a system restore point in win7 (from a place called "lifehacker")
The first one sets the restore point with a label that is supplied from a message box:
If WScript.Arguments.Count = 0 Then
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "wscript.exe", Chr(34) & WScript.ScriptFullName & Chr(34) & " Run", , "runas", 1
Else
GetObject("winmgmts:\\.\root\default:Systemrestore").CreateRestorePoint InputBox("Enter a descriptive name for the restore point:","Create Restore Point - With Description"), 0, 100
End If
The second one sets the restore point with a preset label, in this case, "manual restore point":
If WScript.Arguments.Count = 0 Then
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "wscript.exe", Chr(34) & WScript.ScriptFullName & Chr(34) & " Run", , "runas", 1
Else
GetObject("winmgmts:\\.\root\default:Systemrestore").CreateRestorePoint "Manual Restore Point", 0, 100
End If
Is there a way to combine these two so that if I "cancel" the message box on the first one...
without typing a label; it will simply run the other one to create the restore point with the preset label?
Thanks if you can help.. Ben