topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 12, 2019, 05:54 AM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - benhenry [ switch to compact view ]

Pages: [1]
1
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


Pages: [1]