vbs statement doesn't execute

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can anyone tell me why the following gets error messages and won't execute?
rp = "Scripted Restore Point by " & WScript.ScriptName GetObject
("winmgmts:\\.\root\default:Systemrestore").CreateRestorePoint rp, 0, 100
 
Can anyone tell me why the following gets error messages and won't execute?
rp = "Scripted Restore Point by " & WScript.ScriptName GetObject
("winmgmts:\\.\root\default:Systemrestore").CreateRestorePoint rp, 0, 100

This one works:

Set IRP = getobject("winmgmts:\\.\root\default:Systemrestore")
MYRP = IRP.createrestorepoint ("Manual Restore Point", 0, 100)
 
See if a System Restore point is created, with the name "Manual Restore Point".

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
Windows® Troubleshooting http://www.winhelponline.com


Nothing happens. I copied the command into vbs file. ??
 
Back
Top