[vbs] 定时关闭进程代码
时间:2021-04-21 12:36:32
收藏:0
阅读:0
Dim bag,pipe
do
Set bag=GetObject("WinMgmts:")
Set pipe=bag.execquery("select * from win32_process where name=‘notepad.exe‘")
for each i in pipe
i.terminate()
next
wscript.sleep 1000
loop
打开任务管理器 关闭
wscript.exe
进程即可关闭
或者使用cmd命令taskkill /f /im wscript.exe
关闭,或者把这个命令放到bat文件中作为批处理执行
评论(0)