Process.GetProcessesByName and Windows 2003 Server

  • Thread starter Thread starter Bob Maier
  • Start date Start date
B

Bob Maier

I ran into a problem in an application I wrote. I narrowed
it down to the following line:

Process[] processes = Process.GetProcessesByName
("Notepad");

When I run as an Administrator it works. When I run it as
a member of the Users group I receive the following
exception:

Couldn't get process information from remote machine.

I'm sure its a policy issue, but I don't know which policy
is required?

Any help would be appreciated.

Bob Maier
 
Process.GetProcessesByName uses performance counter, which requires Admin
privilege. This is unfortunate.

Willy Denoyette said:
Not 100% sure but I guess you need debug privileges.

Willy.

I ran into a problem in an application I wrote. I narrowed
it down to the following line:

Process[] processes = Process.GetProcessesByName
("Notepad");

When I run as an Administrator it works. When I run it as
a member of the Users group I receive the following
exception:

Couldn't get process information from remote machine.

I'm sure its a policy issue, but I don't know which policy
is required?

Any help would be appreciated.

Bob Maier
 
Conrad, Bob,
I found out they have to be members of the "Performance Monitor Users" group.
Just like Administrators "Performance Monitor Users" have Debug privileges (SeDebugPrivilege) enabled, but unlike Administrators
they don't have any high level privileges.
I think this should be included in the "Requirements" section of the Method description in the doc's.

Willy.

Conrad Zhang said:
Process.GetProcessesByName uses performance counter, which requires Admin
privilege. This is unfortunate.

Willy Denoyette said:
Not 100% sure but I guess you need debug privileges.

Willy.

I ran into a problem in an application I wrote. I narrowed
it down to the following line:

Process[] processes = Process.GetProcessesByName
("Notepad");

When I run as an Administrator it works. When I run it as
a member of the Users group I receive the following
exception:

Couldn't get process information from remote machine.

I'm sure its a policy issue, but I don't know which policy
is required?

Any help would be appreciated.

Bob Maier
 
Back
Top