怎样用VBS脚本每天定时关闭进程

2024-12-01 14:17:49
推荐回答(1个)
回答1:

Set wmiService = GetObject("winmgmts:\\.\root\cimv2")
Set wmiObjects = wmiService.ExecQuery("SELECT * FROM Win32_process where name='wscript.exe'")
eTart = "12:26"
eT = FormatDateTime(eTart,4)
Do
Tims = FormatDateTime(Time,4)
For Each wmiObject In wmiObjects
If Tims =eT then
wmiObject.terminate
End If
Next
loop