หัวข้อ: ทำวินโดวส์ xp ให้สร้าง Restore Point ทุกวัน เริ่มหัวข้อโดย: mbsamart ที่ มีนาคม 19, 2007, 10:12:21 am ปกติถ้ามีการลงโปรแกรม system restore จะทำการสร้าง Restore Point ให้อยู่แล้วครับ แต่ใครล่ะจะลงโปรแกรมได้ทุกวัน สคริปท์ตัวนี้จะสร้าง Restore Point ใ้ห้ทุกวันวันละครั้ง ให้ก็อปทั้งหมดไปวางไว้ใน Notepad แล้ว Save เป็นชื่ออะไรก็ได้นามสกุล .VBS เช่น crp.vbs ได้แล้วเอาไปวางไว้ใน Startup ของวินโดวส์
' Creates a SR point during the first startup of the day ' December 18, 2005 ' For Windows? XP ' ? 2005 Ramesh Srinivasan ' Website: http://windowsxp.mvps.org Option Explicit Dim SRP, CSRP, objWMI, clsPoint Dim RPDate, D1, D2, dtmInstallDate, DMatch DMatch = 0 Set SRP = getobject("winmgmts:\\.\root\default:Systemrestore") Set dtmInstallDate = CreateObject("WbemScripting.SWbem DateTime") Set objWMI = getobject( _ "winmgmts:\\.\root\default").InstancesOf ("systemrestore") For Each clsPoint In objWMI RPDate = getmytime(clsPoint.creationti me) D1 = Month(RPDate) & "/" & Day(RPDate) & "/" & Year(RPDate) D2 = Month(Date) & "/" & Day(Date) & "/" & Year(Date) If D1 = D2 Then DMatch = 1 Next Function getmytime(wmitime) dtmInstallDate.Valu e = wmitime getmytime = dtmInstallDate.GetV arDate end Function If DMatch = 0 Then CSRP = SRP.createrestorepo int ("Daily Restore Point", 0, 100) End If |