Minimum required privileges to get processname

G

Guest

Hi,

My vb.net console application (.net framework 1.1) is using a call to
Process.GetCurrentProcess.ProcessName.
the app works fine when I run it as administrator, but I would
like the run it with a normal user account using the
least possible privileges.
Does anyone know what rights need to be set?
As test, I already gave the user account the same rights in the Windows
Server
2003 local security policy, but this did not work.

I am not sure if the .NET framework Process class uses
WMI, but adding permissions in WMI control tool did not
work either.

Thoughts anyone?
 
S

Stelrad Doulton

you could try:
System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase
 
P

Peter Huang [MSFT]

Hi

The System.Diagnostics.Process Class uses performance data to obtain
information on processes on the system.
So the user needs to be added to the "Performance Monitor Users" Group to
call run the Process.GetCurrentProcess.ProcessName.

You may have a try and let me know the result.
Also I think you may try Stelrad's suggestion which is an alternative
method.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
G

Guest

Hi Stelrad,
thanks for your reply. Your alternative works well also. I have to keep that
in mind.
Peter
 
G

Guest

Hi Peter,

thanks for the insights. It is indeed as simple as you mentioned. I did not
realize that the process class was using performance data.
Indeed Stelrads alternative works also with less privileges.
regards,
Peter
 
P

Peter Huang [MSFT]

Hi

I am glad that works for you.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top