In some code I have running as a service I do some process monitoring.
I first enumerate using all the processes using the
Systems.Diagnostics.Process.GetProcesses method.

>From there I step through each process (after putting it into an array
of Process)

I go through some stuff, and at some point I want to watch the CPU the
process is using.  To make sure the item I'm looking at is still using
CPU time I check the Process.UserProcessorTime.TotalMilliseconds
property.  Then I sleep X amount of time and look at it again comparing
the two.

This all works *GREAT* but for some reason the service needs to be
logged in as a user that is part of the local Administrators group on
the machine.  I don't understand why Power Users or anything else
wouldn't work.  Almost any user group on the machine can log in and look
at Performance Monitor without a problem right?  Why does this guy need
Administrator privilege to perform these operations?

Any help here would be appreciated.  Folks here aren't too happy about
having to run this service as a local admin on the machine.

=Blain

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to