Guidance
指路人
g.yi.org
Software / Reginald / Examples / repository / Desktop Management / Startup and Shutdown / Restart.rex

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

  
/* Restarts a computer. Change atl-dc-01 to the name of the desired computer */
strcomputer = "atl-dc-01"
objwmiservice = getobject("winmgmts:{impersonationLevel=impersonate,(Shutdown)}!\\" || strcomputer || "\root\cimv2")
coloperatingsystems = objwmiservice~execquery("Select * from Win32_OperatingSystem")
DO objoperatingsystem OVER coloperatingsystems
	objoperatingsystem~reboot()
END
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Mon 2024-10-7  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2010-07-16 20:49:16