dtmconverteddate = createcomobject("WbemScripting.SWbemDateTime")
strcomputer = "."
objwmiservice = getobject("winmgmts:{impersonationLevel=impersonate}!\\" || strcomputer || "\root\default")
colitems = objwmiservice~execquery("Select * from SystemRestore")
IF colitems~count = 0 THEN
SAY "No restore point in system."
ELSE DO objitem OVER colitems
SAY "Name:" objitem~description
SAY "Number:" objitem~sequencenumber
SELECT objitem~restorepointtype
WHEN 0 THEN strrestoretype = "Application installation"
WHEN 1 THEN strrestoretype = "Application uninstall"
WHEN 6 THEN strrestoretype = "Restore"
WHEN 7 THEN strrestoretype = "Checkpoint"
WHEN 10 THEN strrestoretype = "Device drive installation"
WHEN 11 THEN strrestoretype = "First run"
WHEN 12 THEN strrestoretype = "Modify settings"
WHEN 13 THEN strrestoretype = "Cancelled operation"
WHEN 14 THEN strrestoretype = "Backup recovery"
OTHERWISE strrestoretype = "Unknown"
END
SAY "Restore Point Type:" strrestoretype
dtmconverteddate~value = objitem~creationtime
SAY "Time:" dtmconverteddate~getvardate()
END
|