Jump to content
Sign in to follow this  
mayliu

Can I konw Process's User name

Recommended Posts

mayliu

Hi!

Use "Processlist" function,I can know the image name and PID about runnning process.

But if i want to know "user name" of process ,what function i can use.

ps.

Svchost.exe mostly appears as Local Service or Network Services or System in Task manager.

I want to write a script to judge that "svchost.exe" 's user name is Current logon user or System .

So I can terminate the "svchost.exe " by the function "processclose".

Thanks for Everybody's Reply.

Share this post


Link to post
Share on other sites
November

Check This...

The wheel is already invented :D

Services UDF

Cheers


Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Share this post


Link to post
Share on other sites
PsaltyDS

Hi!

Use "Processlist" function,I can know the image name and PID about runnning process.

But if i want to know "user name" of process ,what function i can use.

ps.

Svchost.exe mostly appears as Local Service or Network Services or System in Task manager.

I want to write a script to judge that "svchost.exe" 's user name is Current logon user or System .

So I can terminate the "svchost.exe " by the function "processclose".

Thanks for Everybody's Reply.

If you still want the owner of the process, try _ProcessListProperties(). It gives the owner in [n][3] of the array, or you can just study how it works and extract the usage of $oProc.GetOwner() from it.

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
mayliu

If you still want the owner of the process, try _ProcessListProperties(). It gives the owner in [n][3] of the array, or you can just study how it works and extract the usage of $oProc.GetOwner() from it.

:D

Thanks for your reply. I will try it.

But "$oProc.GetOwner() " function ,Wherei can I get these information.

Share this post


Link to post
Share on other sites
mayliu

If you still want the owner of the process, try _ProcessListProperties(). It gives the owner in [n][3] of the array, or you can just study how it works and extract the usage of $oProc.GetOwner() from it.

:D

Thanks for your reply. I will try it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×