Weird issues when msxml3.dll fails

  • Symptoms
  • I’ve recently had the following symptoms on a computer:

    • Clicking on ‘properties’ after right click on ‘computer’ in the start menu doesn’t do anything


    • I cannot launch eventvwr.msc or eventvwr.exe without getting an error message although I can launch mmc.exe and load the snap-in successfully to read the eventlogs
    • Opening the Windows Update applet from the Control Panel doesn’t work
    • the AV UI fails
    • The volume shadow copy service complains all the time
      Volume Shadow Copy Service error: Unexpected error calling routine CoCreateInstance. hr = 0x80040154, Class not registered


    • The servicing stack is idle and running the System Update Readiness tool to fix Windows corruption errors fails with the following error message:
      Windows update could not be installed because of error 2147746132 “Class not registered”

      NB: I can still extract what’s in the Windows6.1-KB947821-v34-x64.msu file and run checksur.exe manually.

  • More clues
    • The WindowsUpdate.log file indicates:
    • The volume shadow copy service also reports
    • and clicking “manage” after right-clicking ‘computer in the start menu ends with the following error message:
      msxml3.dll is either not designed to run on Windows or it contains an error
  • What’s the problem
  • Everything says msxml3.dll has a problem. Right?

  • What’s the root cause
    • The msxml3.dll is actually empty:
    • and the CBS logs says, it started applying a package supposed to replace msxml3.dll
    • but 2 minutes later, it reported it cannot parse XML anymore
    • What happened during these 2 minutes….is actually a power loss 😦
  • My fix
  • # Gather all msxml3.dll files under %windir%
    $all = dir C:\Windows\* -inc msxml3.dll -rec -for -ea 0
    # restore the most recent version from the component store
    robocopy ($all | Where { $_.FullName -match "amd64" } | sort lastwritetime | Select -Last 1).Directory C:\Windows\system32  msxml3.dll /B
    # register the dll
    regsvr32 C:\Windows\system32\msxml3.dll
    # if that fails, try with the n-1 version
    robocopy ($all |
    Where { $_.FullName -match "amd64" } |
    sort lastwritetime |
    Select -last 2)[0].Directory C:\Windows\system32  msxml3.dll /B
    regsvr32 C:\Windows\system32\msxml3.dll
  • Steps to reproduce the problem
  • # unregister the dll
    regsvr32 /u C:\Windows\system32\msxml3.dll
    # create an empty file
    New-Item C:\Windows\temp -Name msxml3.dll -ItemType File
    # stop services that lock msxml3.dll
    Stop-Service -Name WSearch,WinRM -Verbose
    # kill processes that lock msxml3.dll
    taskkill /im explorer* /f
    # restore the file (ab)using the backup privilege
    robocopy C:\Windows\temp c:\windows\system32 msxml3.dll /r:0 /B

    Leave a Reply

    Fill in your details below or click an icon to log in: Logo

    You are commenting using your account. Log Out /  Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out /  Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out /  Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out /  Change )


    Connecting to %s

    This site uses Akismet to reduce spam. Learn how your comment data is processed.