473,666 Members | 2,284 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.Diagnost ics.Process.Get ProcessesByName () - Exception

Hi,

One of our customers seem to be having an issue with our software getting
the following exception on running the app.

'System.Invalid OperationExcept ion', with the message "Process performance
counter is disabled, so the requested operation
cannot be performed."

(System.Diagnos tics.Process.Ge tProcessesByNam e() seems to be the function it
excepts on)

I've done a look on google and found the following message from MS support

"It is because one performance counter used to retrieve processes are
disabled. To fix it, you try removing the "Disable Performance Counters"
entry from the following registry entry:

HKEY_LOCAL_MACH INE\SYSTEM\Curr entControlSet\S ervices\PerfPro c\Performance

You may refer to the following two Knowledge Base articles to get more
information about enabling and disabling performance monitors:

PRB: Performance Object Is Not Displayed in Performance Monitor
http://support.microsoft.com/default...;EN-US;q249138

INFO: Controlling the Disabling of Performance Monitor Extensions
http://support.microsoft.com/default...;en-us;Q248993

I hope this helps you.

Best regards,

Lion Shi [MSFT]
MCSE, MCSD
Microsoft Support Engineer"

We've managed to repeat the problem here with disabling the Performance
counters.

The customer has checked and the Performance counters are not disabled.
The customer has also explicitly changed the registry to enable performance
counters.

So after more searching on google...

I've asked the customer to (given the time difference, this may take a
while)

1) Check whether the pagefiel has been disabled or not, since this can turn
off the performance counters. Need to ensure it is enabled.
Control Panel -> System -> Advanced -> Performance Settings -> Advanced ->
Change

2) Check or send me the event logs for the PC.
When a perfmon crashes or doesn't report data for a while Windows disables
it and leaves it disabled.

3) Check the status of PerfMon and enable/disable them using the
exctrlst.exe tool from MS, its part of Windows 2000 resource kit.

The customer is running XP Home edition on the offending machine. The
software works fine on other machines (so far).

Has anybody got any other ideas on what I should be looking into to solve
this problem?

Rollasoc




Jul 21 '05 #1
0 3549

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2165
by: jonathan.zimmerman | last post by:
I cannot allow two instances of my app to run, so I try running the following code: #using <mscorlib.dll> #include "mainForm.h" using namespace System::Diagnostics; int __stdcall WinMain() {
0
1235
by: rollasoc | last post by:
Hi, One of our customers seem to be having an issue with our software getting the following exception on running the app. 'System.InvalidOperationException', with the message "Process performance counter is disabled, so the requested operation cannot be performed." (System.Diagnostics.Process.GetProcessesByName() seems to be the function it
5
1109
by: Jarod_24 | last post by:
How do i prevent getting a System.Security.SecurityException when running my app from a Network Drive? My app stopped when checking for a previous instance of itself using the code: Private Function prevInstance() As Boolean Dim pProcess As Diagnostics.Process() pProcess = Diagnostics.Process.GetProcessesByName(System.Diagnostics.Process.GetCurrent
8
2390
by: trialproduct2004 | last post by:
Hi all. I am having application in vb.net. I am having module and one form. From module i am opening form. On main itself i am checking whether another instance of application is running or not. I am also providing faclity of minimizing application to system tray. What i want is after clicking on exe of my application, it should check whether my app is already running or not. If yes i don;t want to create
2
298
by: shivaranjani.s.adimulam | last post by:
Hi, I have a .NET application where I want to restore the previos application if it is already running and in minimized state. The code I added is working fine in the case if the previous application is only minimized but if it is minimized in to the system tray then the code fails.
2
2633
by: Robert S. Liles | last post by:
Following the advice of several members, especially Dragon, I have gotten this routine to work. If you double click on your program's icon to load it, and it is already running minimized into the sysem tray, it will just reopen the running instance, not create another instance. Put this Function into a Module in a DLL and call it like If NoLoad(Me) then END in your Form1.Load routine. This function returns TRUE if an instance is...
5
4186
by: folke | last post by:
I'm using the Process class in my app to start another app, appXXX, I wrote. Appxxx is located at c:\folke\appxxx.exe This is wroking fine from a Windows Application, but NOT from an ASP.NET app. I get the error message: Can't find file! ??? I need to start appxxx from the ASP.NET app! -- Folke
11
3744
by: Nurit N | last post by:
This is the third newsgroup that I'm posting my problem. I'm sorry for the multiple posts but the matter becoming urgent. I hope this is the right place for it... I have created a very simple batch file (echo hello world) and was trying to retrieve the standard output but every time I run the code it returns ExitCode as 1.
0
1798
by: Daniel | last post by:
System.Diagnostics.Process.Start fails on windows server 2003 the process returns process.ExitCode == 0 but executing any process with System.Diagnostics.Process.Start on windows xp works fine. anything to do different for windows server 2003? some special permission for the process that executes another executable with System.Diagnostics.Process.Start ?? here is the code:
0
8443
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8866
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8550
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8639
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6192
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4366
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2769
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.