怎么用VBS锁定计算机?
发布网友
发布时间:2022-05-15 09:54
我来回答
共2个回答
热心网友
时间:2023-10-19 03:39
Set Wshell=WScript.CreateObject(\"WScript.Shell\")
Wshell.Run \"rundll32.exe user32.dll,LockWorkStation\",1,False
或者
Set colOS = GetObject(\"winmgmts:{(Shutdown)}\").ExecQuery(\"Select * FROM Win32_OperatingSystem\")
For Each eOs In colOS
eOs.Win32Shutdown(4)。
热心网友
时间:2023-10-19 03:39
Set Wshell=WScript.CreateObject(\"WScript.Shell\")
Wshell.Run \"rundll32.exe user32.dll,LockWorkStation\",1,False
或者
Set colOS = GetObject(\"winmgmts:{(Shutdown)}\").ExecQuery(\"Select * FROM Win32_OperatingSystem\")
For Each eOs In colOS
eOs.Win32Shutdown(4)
Next
完成了。