给你两种方法:
* J$ q0 P! J* e* k3 a) [7 t m
第一种(VBS):
复制内容到剪贴板
代码:
call reboot()
Function Reboot()
Dim oWMI, oSys, oOpSys
Set oWMI = GetObject("winmgmts:{(shutdown)}!\\.\root\cimv2")
Set oOpSys = oWMI.ExecQuery("SELECT * FROM Win32_OperatingSystem")
For Each oSys In oOpSys
oSys.Reboot
Next
Set oOpSys = Nothing
Set oSys = Nothing
Set oWMI = Nothing
End Function第二种(Bat):
& P. E6 _: [! q1 a; L& n2 k* t/ h
@echo off
" N" f/ L" r1 S2 {9 r( e1 y7 t
shutdown -r