GetProcessesByName fails

Z

zdrakec

Hello all:

The following snippet:

For Each p as Process in GetProcessesByName(procName)
p.Kill()
Next 'p

fails with message:

"Process performance counter is disabled, so the requested operation
cannot be performed."

Help??

Thanks much,
zdrakec
 
H

Herfried K. Wagner [MVP]

zdrakec said:
For Each p as Process in GetProcessesByName(procName)
p.Kill()
Next 'p

fails with message:

"Process performance counter is disabled, so the requested operation
cannot be performed."

'Process' is based on performance counters, if they are disabled or you
don't have rights to access them using 'Process.GetProcesses' will fail. In
Windows 2003 you will have to add the user to a certain group in order to be
able to access performance counters:

<URL:http://groups.google.de/[email protected]>
 
Z

zdrakec

Hello Herfried:

I am running Windows XP (pro). I pulled up my users account info, but
did not find such a group...

Thanks,
zdrakec
 

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