Categories

Links

Print the list of all available System Restore points to a file

Published: May 2004
Updated  : Aug 2005
Send your feedback

This simple VBScript lists all the System Restore points available in your computer, with the Description, Creation time, and the Sequence number.

To run the script, copy the following lines to a Notepad document, and save as a file with .VBS extension (use double-quotes) and double-click the file.

' Prints the list of System Restore points to a text file
' © 2005 Ramesh Srinivasan - https://www.winhelponline.com/xp
' Last updated on: Aug 20, 2005
' Formats the date / time correctly
'-----------------------------------------------------------

Option Explicit
Dim fso, b, objWMI, clsPoint, strComputer, shell
Dim fLine, dtmInstallDate, objOS, fName
fLine = "List of System Restore points found in this computer"
Set shell = CreateObject("Wscript.Shell")
Set fso = Wscript.CreateObject("Scripting.FilesystemObject")
fName = Shell.SpecialFolders("Desktop")
fName = fName & "\ListSR.txt"
set b = fso.CreateTextFile (fName,true)
b.Writeline fLine
b.writeline string(52,"-")
b.writeblanklines 1

strComputer="."

Set dtmInstallDate = CreateObject( _
"WbemScripting.SWbemDateTime")

Set objWMI = GetObject( _
"winmgmts:\\" & strComputer & "\root\cimv2")

Set objOS = objWMI.ExecQuery( _
"Select * from Win32_OperatingSystem")

Set objWMI = getobject( _
"winmgmts:\\" & strComputer & "\root\default").InstancesOf ("systemrestore")
For Each clsPoint In objWMI
b.writeline "Creation Time= " & getmytime(clsPoint.creationtime)
b.writeline "Description= " & clsPoint.description
b.writeline "Sequence Number= " & clsPoint.sequencenumber
b.writeblanklines 1
Next

function getmytime(wmitime)
dtmInstallDate.Value = wmitime
getmytime = dtmInstallDate.GetVarDate
end function

b.close
Shell.Run "notepad.exe " & fName, 1,True
Set fso = Nothing
set shell = Nothing
 

Related article

Quickly reset all the System Restore points