Guidance
指路人
g.yi.org
Software / Reginald / Examples / repository / Desktop Management / System Restore / List.rex

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
/* Lists all system restore points stored on a computer, as well as detailed information about each of those restore points */
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

掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2024-5-3  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2010-07-16 20:49:16