dim process, strprocesstokill, strobject, strcomputer
strcomputer="."
strobject="winmgmts://" & strcomputer
'To kill multiple instance like excel or anything use for loop else use without for loop
for each process in getobject(strobject). instanceof("win32_process")
if (sys. waitprocess(strprocess), 0).exists) then
sys. process(strprocess). Terminate()
End if
Next
No comments:
Post a Comment