Link to home
Create AccountLog in
Avatar of itnifl
itniflFlag for Norway

asked on

VBS Query PID of specific users process

I need a VBS script to query for a PID of a process based on username and process name.
I only need the WQL statement. I was thinking something like:
SELECT * from Win32_Process Where Name='name' AND Where UUID='something something'

Now theres a Name property there for the process name, but there is nothing that identifies the owner of the process. I don't want to find all processes on a WTS for a given processname, only for a specific user.

Anyone with some help on this?
SOLUTION
Avatar of Alan_White
Alan_White
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
ASKER CERTIFIED SOLUTION
Avatar of RobSampson
RobSampson
Flag of Australia image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.