Microsoft KB Archive/295563

{|
 * width="100%"|

PRB: Generic Failure Enumerating Instances with WMI's Performance Monitor Provider

 * }

Q295563

-

The information in this article applies to:


 * Windows Management Instrumentation, version 1.5

-

IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the &quot;Restoring the Registry&quot; Help topic in Regedit.exe or the &quot;Restoring a Registry Key&quot; Help topic in Regedt32.exe.

SYMPTOMS
When you are using Windows Management Instrumentation (WMI) and the Performance Monitor Provider for WMI to retrieve performance counter data for a specific performance object, the provider may fail to enumerate instances, and it returns the following error message:

&quot;Generic Failure&quot; (WBEM_E_FAILED 0x80041001)

CAUSE
If the performance object has multiple indexes registered under the multiple string &quot;Counter&quot; value, then the WMI Performance Provider may be using the wrong index.

RESOLUTION
WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the &quot;Changing Keys and Values&quot; Help topic in Registry Editor (Regedit.exe) or the &quot;Add and Delete Information in the Registry&quot; and &quot;Edit Registry Data&quot; Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT or Windows 2000, you should also update your Emergency Repair Disk (ERD).

The multistring Counter value is located under the following registry key for English systems:

"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PerfLib\009" You must use RegEdt32 to modify this value. The data is stored as MULTI_SZ strings. This data type consists of a list of Unicode strings, each terminated with UNICODE_NULL. The last string is followed by an additional UNICODE_NULL. The strings are listed in pairs. The first string of each pair is the Unicode string of the index, and the second string is the actual name of the index. The Counter data uses only even-numbered indexes.

To use the Windows 2000 Directory Services performance counters as an example, you should be able to search this string list for &quot;NTDS&quot; and only find once instance. &quot;NTDS&quot; would be followed by indexes and names of its associated counters.

If &quot;NTDS&quot; is found in the list more than once, you should note the associated indexes for each occurrence. Whichever index matches the &quot;First Counter&quot; value under HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NTDS\Performance is the correct index and should be left in the registry. You should delete each incorrect occurrence of the &quot;NTDS&quot; pair and the associated counter pairs. Probably the best way to determine how many counters to delete for the particular performance object is to look in the Performance Monitor application and note what the first and last counters are.

Once this is complete, restart the WINMGMT service or simply restart the system.

MORE INFORMATION
For more information, see the following MSDN Online topics:

Retrieving Counter Names and Explanations

http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/pdh/perfdata_6mpf.htm

WMI Performance Monitor Provider

http://msdn.microsoft.com/library/psdk/wmisdk/sdkprov_5xrm.htm Additional query words:

Keywords : kbOSWin2000 kbOSWin2000bug kbWEBM _IK kbWMI150 kbWMI150bug kbWMI150fix

Issue type : kbprb

Technology : kbWMISearch kbAudDeveloper kbWMI150