保存下面代码为CreateRestorePoint.vbs文件,双击即可。
也可以放到开机启动项里或登陆脚本里。
CONST DEVICE_DRIVER_INSTALL = 10 CONST BEGIN_SYSTEM_CHANGE = 100 strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\default") Set objItem = objWMIService.Get("SystemRestore") errResults = objItem.CreateRestorePoint _ ("Scripted restore", DEVICE_DRIVER_INSTALL, BEGIN_SYSTEM_CHANGE) Wscript.Echo errResults |
P.S.微软还有好多脚本呢,自己去看吧!
http://www.microsoft.com/china/technet/community/scriptcenter/default.mspx
受教了!呵呵!