Performance counters are EVIL. Don’t use them.
if(PerformanceCounterCategory.Exists("ILoveYou") ) // is true
{
PerformanceCounterCategory.Delete("ILoveYou");
//throws exception The **configuration registry** key is invalid
}
at System.Diagnostics.PerformanceCounterLib.RegisterFiles(String arg0, Boolean unregister)
at System.Diagnostics.PerformanceCounterLib.UnregisterCategory(String categoryName)
at System.Diagnostics.PerformanceCounterCategory.Delete(String categoryName)
at WindowsFormsApplication1.Program.SetupCategory()
All I found is this:
http://blogs.msdn.com/b/oanapl/archive/2009/04/24/fix-corrupted-performance-counters.aspx
(Using LODCTR /R)
and it doesn’t help. As I have no idea what file are they talking about. Anyone got any other ideas?
PS
I use Windows XP SP3 may this be the problem? I understand it is suppose to support performance counters fully unless I cancel the page file.
to make this clear my problemis that I’m unable to UNINSTALL my counters.
My company runs into problems with the performance counters getting corrupt regularly. If it is a problem with the actual counters being corrupt, you can check for corrupted Performance Counters by:
start | run | perfmonIf the Counters are numbers or Blank:
%windir%\system32:Perfc009.datPerfh009.datPerfi009.datD:\I386)This is the best solution we have found for the issue.