Back to FAQ home page

 Repair WMI


Important disclaimer:

This FAQ entry relates to Microsoft products.  As they are not our own products, we offer this information solely as a courtesy, as-is, with no guarantees or warranties whatsoever.  Use at your own risk.

If you have a support agreement via TechNet, MSDN or license subscriptions, go there first for assistance from Microsoft directly.


NOTE:
Microsoft offers a WMI Diagnostic tool for Windows NT through Server 2003 on their website.

Repair Windows 7, Vista |  Repair Windows XP SP2/SP3  |  Repair Server 2003  |  Repair Windows 2000 or XP SP1


REPAIRING WMI ON WINDOWS 7 OR VISTA

Launch a Command window As Administrator (right-click the shortcut in All Programs > Accessories and select Run As Administrator).

Type the command

winmgmt /salvagerepository


REPAIRING WMI ON WINDOWS XP SP2:

Click Start > Run then type CMD and enter.

Type the command:

rundll32 wbemupgd, UpgradeRepository

 After running UpgradeRepository you can verify the results by looking ay the Setup log:

 (%windir%\System32\Wbem\Logs\Setup.log).

If inconsistencies are detected and if the operating system was able to rebuild the Repository you should see information in Setup.log similar to this:


(Wed Oct 12 13:46:36 2005): ===========================================================================
(Wed Oct 12 13:46:36 2005): Beginning WBEM Service Pack Installation
(Wed Oct 12 13:46:36 2005): Current build of wbemupgd.dll is 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
(Wed Oct 12 13:46:36 2005): Current build of wbemcore.dll is 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
(Wed Oct 12 13:46:52 2005): Inconsistent repository detected; it will be recreated

(Wed Oct 12 13:47:33 2005): Wbemupgd.dll Service Security upgrade succeeded (XP SP update).
(Wed Oct 12 13:47:33 2005): WBEM Service Pack Installation completed.
(Wed Oct 12 13:47:33 2005): ===========================================================================

Note: There will probably be other entries in the log as well, but you should specifically look for the ones shown above.
 


REPAIRING WMI ON WINDOWS SERVER 2003:

Click Start > Run then type CMD and enter.

Type the command:

rundll32 wbemupgd, CheckWMISetup

Check the WMI Setup log (%windir%\System32\Wbem\Logs\Setup.log). If you see entries similar to this, then the consistency check has failed:

(Wed Oct 12 14:17:14 2005): Failing Connecting to Namespace [root\default] with result [80041002]

You can then try to repair the Repository by typing the following command from the command prompt (again, the parameter RepairWMISetup is case-sensitive):

rundll32 wbemupgd, RepairWMISetup


REPAIRING WMI ON WINDOWS 2000 or XP SP1:

Note: Windows 2000 SP3 has known problems with WMI, corrected in SP4.  If you are not on SP4, you need to update your Windows 2000 computer.

Click Start > Run then type CMD and enter.

Type the command:

net stop winmgmt

In Windows Explorer go to C:\Windows\System32\wbem and rename the Repository folder to Repository_bad.

Go back to the Command window and type:

net start winmgmt

Extra step to ensure none of the components are unregistered for some reason:

In the CMD window type the following in sequence:

cd /d %windir%\system32\wbem
for %i in (*.dll) do RegSvr32 -s %i
for %i in (*.exe) do %i /RegServer


Back to FAQ home page