WMI 'Invalid Class' Error caused by missing files

Author: NetworkAdminKB.com
Created: 2008-05-02
Modified: 2008-11-19

Issue:

You receive an WBEM_E_INVALID_CLASS (0x80041010) or SWbemObjectSet: Invalid class error when accessing certain WMI classes on Windows 2003 servers.

 

Common Classes effected.

Win32_Product

Win32_ApplicationService

Win32_Property

Win32_ProductSoftwareFeatures

 

Cause:

The associated MOF and DLL files are missing from the server installation.  The following are known files to be commonly missing from some Windows 2003 installations.

 

Msi.mof

Msiprov.dll

These file are usually found in the %systemroot%\system32\wbem folder

 

Solution:

Verify that the associated MOF files are missing by using the MSDN web site to determine which MOF and DLL files are missing.

Example: Win32_Product Class web page

http://msdn.microsoft.com/en-us/library/aa394378(VS.85).aspx

 

Requirements

Client

Requires Windows Vista, Windows XP, Windows 2000 Professional, or Windows NT Workstation 4.0 SP4 and later.

Server

Requires Windows Server 2008, Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0 SP4 and later.

MOF

Declared in Msi.mof.

DLL

Requires Msiprov.dll.

Namespace

Defined in \root\cimv2.

 

Check the %systemroot%\system32\wbem folder for these files.

 


Common missing MOF files relate to the Windows Installer and can be added by installing the WMI Windows Installer Provider.

 

To install the WMI Windows Installer Provider do the following

1)      Open Control Panel.

2)      Open the Add or Remove Programs applet.

3)      Press the Add/Remove Windows Components button.

4)      Select the Management & Monitoring Tools item.

5)      Press the Details button.

6)      Check the WMI Windows Installer Provider box.

7)      Press OK.

8)      Press Next.

9)      Complete the on-screen instructions.

 

If the missing files are not related to the WMI Windows Installer Provider then you can do the following

1)      Extract the missing files from the CD or appropriate service pack

2)      Place the file in the  “%systemroot%\system32\wbem” folder

3)      For each MOF file execute the following

a.       Mofcomp filename.mof

4)      For each WMI DLL execute the following

a.       Regsvr32 /s filename.dll

5)      Stop and Start the WMI Service.

 

Restarting the WMI Service

1)      Using Computer Manager

a.       Goto Services

b.      Select “Windows Management Instrumentation”

c.       Right Click

d.      Select Restart

Article ID: 73, Created On: 9/16/2011, Modified: 9/16/2011