本文主要是介绍A scripting for rebooting system,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
2005年08月19日 11:59:00 strComputer = " . "
Set objWMIService = GetObject ( " winmgmts: " _
& " {impersonationLevel=impersonate,(Shutdown)}!/ " & strComputer & " ootcimv2 " )
Set colOperatingSystems = objWMIService.ExecQuery _
( " Select * from Win32_OperatingSystem " )
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Reboot()
Next
Set objWMIService = GetObject ( " winmgmts: " _
& " {impersonationLevel=impersonate,(Shutdown)}!/ " & strComputer & " ootcimv2 " )
Set colOperatingSystems = objWMIService.ExecQuery _
( " Select * from Win32_OperatingSystem " )
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Reboot()
Next
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=458734
这篇关于A scripting for rebooting system的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!