Re: Kill an Application via Application Name
- From: shb*NO*SPAM*@comporium.net (Si Ballenger)
- Date: Thu, 03 Aug 2006 23:14:18 GMT
On 3 Aug 2006 03:09:47 -0700, rossc@xxxxxxxxxxxxx wrote:
Hi Guys
I have some very bad software from a third party that is being phased
out. Unfortuneately not yet! when it runs on my server it creates an
alert box with a C++ error, though only intermittently. I need to kill
these each time it does.
My problem is that I cannot just get the process name and kill it as we
have some genuine processes running under this name
I can identify the error alert under the task manager appplications
tab, and ideally that would be the way to determine which process to
kill
Any ideas
Thanks in advance
Ross
I use the below to kill running applications. This setup will
kill running instances of notepad.exe.
======================================
Set objArgs = WScript.Arguments
processEXE = "notepad.exe"
'processEXE = objArgs(0)
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& "." & "\root\cimv2")
Set colProcess = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = '" & processEXE & "'"
)
For Each objProcess in colProcess
objProcess.Terminate()
next
wscript.quit
.
- Follow-Ups:
- Re: Kill an Application via Application Name
- From: rossc
- Re: Kill an Application via Application Name
- References:
- Kill an Application via Application Name
- From: rossc
- Kill an Application via Application Name
- Prev by Date: Re: client side html dynamic table creation
- Next by Date: Need help please
- Previous by thread: Re: Kill an Application via Application Name
- Next by thread: Re: Kill an Application via Application Name
- Index(es):
Relevant Pages
|