I'm trying to use Vista's process list utility to find a PID. You should be able to do this:

query process program.exe

What I'm finding is that if the program name is short (like above), it will find it. But if it's long, like the following:

query process notificationmanager.exe

it won't find it. The length in question seems to be the display length of the query process command itself, which is 12 characters.

Is there a special syntax for specifying long program names?

link|improve this question
feedback

3 Answers

up vote 0 down vote accepted

query process notificationmanager

Note, it isn't a matter of dropping the .exe, but rather just take the first 19 characters.

A consequence of this, is that it will return all processes whose name starts with notificationmanager.

link|improve this answer
Thank you, this is the most direct solution – jjkparker Jul 28 '10 at 13:00
feedback

Does it work if you put the program name in double quotes, e.g.:

query process "notificationmanager.exe"
link|improve this answer
No, it doesn't. – jjkparker Jul 26 '10 at 18:04
feedback

if you can use wmic then

wmic process where "name = 'notificationmanager.exe' list brief

link|improve this answer
Great answer, thanks for this – jjkparker Jul 28 '10 at 13:00
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.