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?

Re: Minimum required privileges to get processname by Stelrad

Stelrad
Tue Apr 19 05:54:10 CDT 2005

you could try:
System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase
"ptrryrs" <ptrryrs@newsgroup.nospam> wrote in message
news:072F50CD-2023-43CA-9EEA-C89944DABFFB@microsoft.com...

> 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?
>



RE: Minimum required privileges to get processname by v-phuang

v-phuang
Tue Apr 19 21:39:41 CDT 2005

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.


Re: Minimum required privileges to get processname by ptrryrs

ptrryrs
Wed Apr 20 09:47:01 CDT 2005

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

"Stelrad Doulton" wrote:

> you could try:
> System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase
> "ptrryrs" <ptrryrs@newsgroup.nospam> wrote in message
> news:072F50CD-2023-43CA-9EEA-C89944DABFFB@microsoft.com...
>
> > 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?
> >
>
>
>

RE: Minimum required privileges to get processname by ptrryrs

ptrryrs
Wed Apr 20 09:50:04 CDT 2005

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

""Peter Huang" [MSFT]" wrote:

> 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.
>
>

RE: Minimum required privileges to get processname by v-phuang

v-phuang
Wed Apr 20 22:00:03 CDT 2005

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.