'备注:vbs强制关闭程序
'防止出现错误
On Error Resume Next
'vbs代码开始----------------------------------------------
sub Close_Process(ProcessName)
On Error Resume Next
for each ps in getobject("winmgmts:\\.\root\cimv2:win32_process").instances_ '循环进程
if Ucase(ps.name)=Ucase(ProcessName) then
ps.terminate
end if
next
end sub
do
Close_Process("iexplore.exe")
wscript.sleep 1000*2
loop
'防止出现错误
On Error Resume Next
'vbs代码开始----------------------------------------------
sub Close_Process(ProcessName)
On Error Resume Next
for each ps in getobject("winmgmts:\\.\root\cimv2:win32_process").instances_ '循环进程
if Ucase(ps.name)=Ucase(ProcessName) then
ps.terminate
end if
next
end sub
do
Close_Process("iexplore.exe")
wscript.sleep 1000*2
loop
'iexplore.exe是记事本程序的进程,你可以换成其他进程名字
‘时间间隔是2秒。