View Single Post
Old 10-10-2008   #4 (permalink)
James Whitlow


 
 

Re: How to terminate a Win32 process without using "winmgmts:"

>> "Smoreno" <Smoreno@xxxxxx> wrote in message
Quote:
Quote:

>> news:BC3F0888-3984-455B-8752-69DEEF321B11@xxxxxx
Quote:

>> > Hello,
>> >
>> > I use the following script to terminate the process listed in it. As
>> > the
>> > server gets loaded killing the process (terminate()) takes longer as
>> > the
>> > load
>> > increases. The WMI service takes longer find and kill the process.
>> >
>> > Other than calling WMI, is there another way to kill the process via
>> > script
>> > that doesn't take a long time?
>>
>> You might consider shelling out to Taskkill:
>>
>> http://technet.microsoft.com/en-us/l.../bb491009.aspx
>>
>> I don't know if it is going to be faster or not, but it does allow
>> you
>> to filter by username.
> Hello,
>
> how do you determine the process id for the app to kill? This is a Citrix
> environment so I need to make sure that the only the process ID for a
> specific user is killed.
> Don't we have to use WMI to determine the process ID for that?
You can use 'tasklist.exe' to list tasks with associated PID. However,
'taskkill.exe' allows you to specify a username, so you should be able to
isolate it's task killing to a specific user. I have not used 'taskkill.exe'
before, I was just offering it up as an alternative to WMI.

Can you offer the group additional details on what you are trying to
accomplish? We might be able to offer you other options if we better
understand what you are trying to accomplish.


My System SpecsSystem Spec