GetProcessByName throws InvalidOperation Exception : Access denied

G

Guest

Hello,

I'm running a VB.NETcode that uses GetProcessByName to verify if a certain
process is currently running on remote computers. The computers are in the
same network domain as my computer. The code works just fine if I'm looking
at my own computer, but it throws InvalidOperation exception : Access denied
when I tried to verify the running process on remote computers. I have
verified the following on the remote computers:

1. Process performance counter is NOT disabled. I don't see "Disable
Performance Counters" REG_DWORD registry value in the
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\PerfOS\Performance

2. Counter and Help registry values are INTACT in the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009

Can anyone tell me why GetProcessByName throws InvalidOperation access
denied when I use it to see running processes on remote computer? Is there a
minimum permission level to access remote computer? Thanks.

Michael
 
D

Dmytro Lapshyn [MVP]

Hello,

You have to have administrative permissions (or at least really elevated
ones) on the remote machines to query for the process list. This is not
..NET-specific, it's how Windows works.
 

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