Repair WMI

download Repair WMI

of 3

Transcript of Repair WMI

  • 8/3/2019 Repair WMI

    1/3

    How To: Repair WMISymptoms of the problemWhen you try to access a Windows XP-based network computer, you receive an errormessage that resembles the following:

    xxxxxxxis not accessible. You might not have permission to use this networkresource. Access is denied.

    Note In this error message,xxxxxis the IP address or the computer name of theWindows XP-based computer.

    You may experience this issue when you use the IP address or the computer name toaccess a shared folder that is stored on the Windows XP-based computer. You mayalso experience this issue when you use My Network Places to access a shared folderin this situation.

    Cause:

    WMI (Windows Management Instrumentation) is corrupted.

    Solution:

    Re-install WMI:

    This is the one that worked in my case:Comprehensive rebuild method

    Click Start, Run and type the following command, and press ENTER:

    rundll32.exe setupapi,InstallHinfSection WBEM 132 %windir%\inf\wbemoc.inf

    Insert your Windows XP CD into the drive when prompted. Repair process should takefew minutes to complete. Then restart Windows for the changes to take effect.

    Other Solutions:Microsoft's WMI diagnosis utility

    Microsoft has released a new diagnosis tool that helps system administratorsdiagnose and repair problems with the WMI. It is advisable to go through theWMIDiag_ReadMe.doc file to understand how the utility works, and the supportedcommand-line arguments. Here is the download link:The WMI Diagnosis Utility

    You may use the utility (WMIDiag.vbs) to find if a repository rebuild is necessary ornot. The utility runs a comprehensive testing of WMI and reports the results to a logfile, which is placed in the user's Temp folder (%Temp%) folder by default.

    Mr. Alain Lissoir [MS] was kind enough to share the following info with me:

    If there is a need among all problems detected by WMIDiag to rebuild the repositoryafter attempting all fix suggested by WMIDiag, WMIDiag will list the rebuild of therepository as the last action among thing that can be done (before rebuilding therepository).

    Here are some of the useful links that I came across from Alain's homepage:

    Windows Management Instrumentation (WMI) Team Blog

    DO NOT DELETE THE REPOSITORY right away! Read this article instead! WMIIsn't Working!

    http://www.microsoft.com/downloads/details.aspx?familyid=d7ba3cd6-18d1-4d05-b11e-4c64192ae97d&displaylang=enhttp://www.lissware.net/http://blogs.msdn.com/wmi/default.aspxhttp://www.microsoft.com/technet/scriptcenter/topics/help/wmi.mspxhttp://www.microsoft.com/technet/scriptcenter/topics/help/wmi.mspxhttp://www.microsoft.com/technet/scriptcenter/topics/help/wmi.mspxhttp://www.lissware.net/http://blogs.msdn.com/wmi/default.aspxhttp://www.microsoft.com/technet/scriptcenter/topics/help/wmi.mspxhttp://www.microsoft.com/technet/scriptcenter/topics/help/wmi.mspxhttp://www.microsoft.com/downloads/details.aspx?familyid=d7ba3cd6-18d1-4d05-b11e-4c64192ae97d&displaylang=en
  • 8/3/2019 Repair WMI

    2/3

    Rebuilding the WMI Repository

    If you experience behavior when using WMI, such as application errors or scripts thatused to work are no longer working, you may have a corrupted WMI repository. To fixa corrupted WMI repository, you have to reinstall WMI. Follow these steps:

    For Windows XP Service Pack 2

    Click Start, Run and type the following command:

    rundll32 wbemupgd, UpgradeRepository

    This command is used to detect and repair a corrupted WMI Repository. The resultsare stored in the setup.log (%windir%\system32\wbem\logs\setup.log) file.

    For Windows Server 2003

    Use the following command to detect and repair a corrupted WMI Repository:

    rundll32 wbemupgd, RepairWMISetup

    On other versions of Windows you can rebuild the Repository by doing the following:

    Click Start, Run and type CMD.EXE

    Type this command and press Enter:

    net stop winmgmt

    Using Windows Explorer, rename the folder %windir%\System32\Wbem\Repository. (For example, %windir%\System32\Wbem\Repository_bad.).%windir% represents the path to theWindows directory, which is typically C:\Windows.

    Switch to Command Prompt window, and type the following and press ENTERafter each line:

    net start winmgmt

    EXIT

    Courtesy: The above is excerpted from Microsoft Technet article WMI Isn't Working! 2007 Microsoft Corporation. All rights reserved.

    Re-registering the WMI components (RefWMI FAQ)

    The .DLL and .EXE files used by WMI are located in %windir%\system32\wbem. Youmight need to re-register all the .DLL and .EXE files in this directory. If you arerunning a 64-bit system you might also need to check for .DLLs and .EXE files in%windir%\sysWOW64\wbem.

    To re-register the WMI components, run the following commands at the commandprompt:

    cd /d %windir%\system32\wbem

    for %i in (*.dll) do RegSvr32 -s %i

    for %i in (*.exe) do %i /RegServer

    http://www.microsoft.com/technet/scriptcenter/topics/help/wmi.mspxhttp://www.microsoft.com/technet/scriptcenter/resources/wmifaq.mspx#EHAAhttp://www.microsoft.com/technet/scriptcenter/topics/help/wmi.mspxhttp://www.microsoft.com/technet/scriptcenter/resources/wmifaq.mspx#EHAA
  • 8/3/2019 Repair WMI

    3/3

    Note that none of the above two methods restore the missing files relatedto Windows Management Instrumentation (WMI). So, below is acomprehensive repair procedure that restores all the missing WMI modules.In case of missing WMI modules, you may use the following method.Comprehensive rebuild method

    Important note: If you've installed a Service Pack, you need to insert your WindowsXP CD with Service Pack integration (called as the SlipstreamedWindows XP CD). Ifyou don't have one, you may point to the %Windir%\ServicePackFiles\i386 folder fora recent version of the system files required during WMI repair. Or you may create aslipstreamed Windows XP CD and insert it when prompted.

    Click Start, Run and type the following command, and press ENTER:

    rundll32.exe setupapi,InstallHinfSection WBEM 132 %windir%\inf\wbemoc.inf

    Insert your Windows XP CD into the drive when prompted. Repair process should takefew minutes to complete. Then restart Windows for the changes to take effect.http://windowsxp.mvps.org/repairwmi.htm

    http://windowsxp.mvps.org/repairwmi.htmhttp://windowsxp.mvps.org/repairwmi.htm