Set wmi=GetObject("winmgmts:{(shutdown)}\\.\root\cimv2")Set list=wmi.ExecQuery("select * from win32_operatingsystem")For Each uu In listuu.win32shutdown(1+4)'关机next Set wmi=GetObject("winmgmts:{(shutdown)}\\.\root\cimv2")Set list=wmi.ExecQuery("select * from win32_operatingsystem")For Each uu In listuu.win32shutdown(2+4)'重启next Set wmi=GetObject("winmgmts:{(shutdown)}\\.\root\cimv2")Set list=wmi.ExecQuery("select * from win32_operatingsystem")For Each uu In listuu.win32shutdown(0+4)'注销next