I have multiple instance of WSCRIPT.exe running on our server under SYSTEM user.
I need to kill these processes using TaskKill.
Will this kill all the instances/processes?
strProcess = "WScript.exe"
Set oShell= CreateObject("WScript.Shell")
oShell.Run "TaskKill /s /im " & strProcess & " /f", WindowStyle, WaitOnReturn
Set oShell = Nothing
Also, what will happen if I do not have an instance of wscript.exe and I run the above script?
I need to kill these processes using TaskKill.
Will this kill all the instances/processes?
strProcess = "WScript.exe"
Set oShell= CreateObject("WScript.Shell")
oShell.Run "TaskKill /s /im " & strProcess & " /f", WindowStyle, WaitOnReturn
Set oShell = Nothing
Also, what will happen if I do not have an instance of wscript.exe and I run the above script?