1.

Solve : Restore Point from .bat file??

Answer»

Under Windows 7 HOME Premium 64-bit, does anyone know if it's possible to create a restore point from a batch file? I run the same batch file at least once a day and would be very convenient to create a retore point at the same time.

Thanks in advance!
You'll need a VBScript to do the heavy LIFTING, but you can use a batch file wrapper if needed:

Code: [Select]Set sr = GetObject("winmgmts:\\.\root\default:Systemrestore")
If (sr.CreateRestorePoint("My Daily Restore Point", 0, 100)) <> 0 Then
MsgBox "My Daily Restore Point FAILED!"
End If

Save the script with a VBS extension. It can be run at the COMMAND LINE or from a separate batch file using this notation:

cscript scriptname.vbs

You may have to insert path information for the script location.

Good luck.



Discussion

No Comment Found