How to use pskill or kill ... to kill a process with a name like "Hello There"

  • Thread starter Thread starter flahmeshess
  • Start date Start date
F

flahmeshess

Hi !

Normally, I find that a process would have a image name like
svchost.exe. But I have a program which does not have extension and
has a space in it, eg "Hello There" (not the real image name).
I try to use pskill or kill command to remove it but it does not
work. I don't want to kill it by the taskid as I want to kill it via
a batch.
So any advice how to kill such procoesses ?

Thanks a lot.
 
Yes. Already tried... pskill says Process does not exist.
Kill - no output but process still running.
 
flahmeshess said:
Hi !

Normally, I find that a process would have a image name like
svchost.exe. But I have a program which does not have extension and
has a space in it, eg "Hello There" (not the real image name).
I try to use pskill or kill command to remove it but it does not
work. I don't want to kill it by the taskid as I want to kill it via
a batch.
So any advice how to kill such procoesses ?

Thanks a lot.

Kill it by its process number. TList.exe or tasklist.exe will give
you the number.
 
But I dont' want to kill by process number if possible. The reason is
that I'm running it in a batch and I can't hardcode the process
number.
 
That's no valid reason at all! The following batch file will
do exactly what you want:

@echo off
for /F %%a in ('tlist ^| find /i "Outlook"') do echo kill %%a

Remove the word "echo" in order to activate the kill command.
 
Thanks. Yet to try this cause I use the pskill or kill command. Don't
have the tlist command. Will search for it. Thanks again.
 
Thanks for the help. I found that there is a space at the back of the
process. So when I just use quote and add a space, pskill is able to
kill the process. Thanks again.
 
Back
Top