Monday, April 7, 2008

schedule a restore point

Paste the following two lines of code into notepad. Then save the file with restore.vbs extention, e.g. save it as something like 'restorepoint.vbs'

Set IRP = getobject ("winmgmts:\\.\root\default:Systemrestore" )

MYRP = IRP.createrestorepoint ("Tamilchild Restore Point", 0, 100)

with that done, run the file manually, then open system restore and verify the restore point was created ok.

Now you can use scheduled tasks in the normal way to create a restore point as you wish. Needless to say, the account you schedule this to run under will need to be an admin account.

No comments: