Script for creating System Restore Checkpoints

R

Robert McEvoy

How can I find out if I am creating system Restore checkpoints.

Where would they be located , the name of the file

Also would this script create a vaild checkpoint

Bob





' 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.SWbemDateTime")
Set objWMI = getobject( _
"winmgmts:\\.\root\default").InstancesOf ("systemrestore")
For Each clsPoint In objWMI
RPDate = getmytime(clsPoint.creationtime)
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.Value = wmitime
getmytime = dtmInstallDate.GetVarDate
end Function

If DMatch = 0 Then
CSRP = SRP.createrestorepoint ("Daily Restore Point", 0, 100)
End If
 
R

Ramesh, MS-MVP

How can I find out if I am creating system Restore checkpoints.

The checkpoints can be seen in the System Restore user interface.

"drive:\System Volume Information" folder present under each drive.

Yes, that's what it does, just as the description says.

More details at:

How to automatically create a System Restore point upon the first boot up of the day?:
http://windowsxp.mvps.org/createrp.htm


--
Regards,

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


How can I find out if I am creating system Restore checkpoints.

Where would they be located , the name of the file

Also would this script create a vaild checkpoint

Bob





' 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.SWbemDateTime")
Set objWMI = getobject( _
"winmgmts:\\.\root\default").InstancesOf ("systemrestore")
For Each clsPoint In objWMI
RPDate = getmytime(clsPoint.creationtime)
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.Value = wmitime
getmytime = dtmInstallDate.GetVarDate
end Function

If DMatch = 0 Then
CSRP = SRP.createrestorepoint ("Daily Restore Point", 0, 100)
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top