Windows Modules Installer Error:126

Anonymous
2009-10-29T22:22:40+00:00

My Gateway has Vista Home Premium 64 bit with SP1. Windows updates are not working at all.

After doing some digging I discovered Avast Anti-Virus may have deleted TrustedInstaller.exe which I believe may have something to do with the problem although TrustedInstaller.exe is still in C:/WINDOWS/services (which as far as I know is the correct location). Also, when I open Services (Start > Search "Services" > Services) and try to start the Windows Modules Installer It gives me the error:126 The specified module could not be found. This led me to belive that it may have something to do with my registry?

sfc /scannow also does not work.

Ive tried a number of fixes. One involved copying TrustedInstaller.exe from a friends computer to my C:/WINDOWS/Services

I have also consulted similar posts on this site sadly, to no avail. I tried installing SP2 hoping that would fix it, but without Windows Modules Installer working I could not get it to work.

I am willing to try anything short of reformatting. Restore is not an option as I dont have a restore point...

Any help you can provide with this would be greatly appreciated. Please explain in begginers terms any instructions you may have to fix this as I am little more than a beginner. Google is the only thing that got me this far :-)

Windows for home | Previous Windows versions | Install and upgrade

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2011-01-30T01:35:08+00:00

Ok folks quit your freakout...the answer exists and Google can find it. I fixed it on mine.

My symptoms:

  • Windows update fails
  • Manual install of service pack fails
  • sfc fails
  • Windows Modules Installer (aka TrustedInstaller) won't run and returns error 126
  • ...other stuff I can't remember fails
  • Errors like CO_E_SERVER_EXEC_FAILURE(0x80080005)

I read through a number of threads like this, here and on other sites. I tried the instructions above to no avail (although I can't be sure they weren't part of the solution). Then I found this:

http://www.vistax64.com/tutorials/282940-windows-modules-installer-error-126-fix.html

There is much detail there, written in broken English, with screenshots provided. Here is what worked for me, partially copypasta and partially paraphrased for brevity and clarity:

I was missing the following registry key: 

HKLM\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing\Version.

To fix it:

  1. Navigate to C:\Windows\Servicing\Version and read the name of a subfolder. It will be named something like 6.1.7600.16385. That is your {TrustedInstaller ID}. Copy the name of that folder to the clipboard (and paste it in Notepad for safe keeping). 
  2. Find a subfolder in C:\Windows\WinSxS whose name starts with:

x86_microsoft-windows-servicingstack_31bf3856ad364e35_{TrustedInstaller ID} (32bit Windows)

amd64_microsoft-windows-servicingstack_31bf3856ad364e35_{TrustedInstaller ID} (64bit Windows)

Copy the name of that folder to the clipboard (and paste it in Notepad for safe keeping).

  1. Create subkey "HKLM\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing\Version". You will need to take ownership of "Component Based Servicing" then give yourself full access permissions before you can create the key.
  2. In the new Version key, create an "expandable value" using the TrustedInstaller ID as its name and the complete path of the folder you identified in WinSxS as its value. Properly you should use %SystemRoot%\WinSxS\whatever instead of C:\Windows\WinSxS\whatever.

Was this answer helpful?

300+ people found this answer helpful.
0 comments No comments

64 additional answers

Sort by: Most helpful
  1. Anonymous
    2014-11-12T14:27:55+00:00

    This did not work for me :(

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2011-06-23T00:01:30+00:00

    I was missing the following registry key: 

    HKLM\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing\Version.

    To fix it:

    1. Navigate to C:\Windows\Servicing\Version and read the name of a subfolder. It will be named something like 6.1.7600.16385. That is your {TrustedInstaller ID}. Copy the name of that folder to the clipboard (and paste it in Notepad for safe keeping). 
    2. Find a subfolder in C:\Windows\WinSxS whose name starts with:

    x86_microsoft-windows-servicingstack_31bf3856ad364e35_{TrustedInstaller ID} (32bit Windows)

    amd64_microsoft-windows-servicingstack_31bf3856ad364e35_{TrustedInstaller ID} (64bit Windows)

    Copy the name of that folder to the clipboard (and paste it in Notepad for safe keeping).

    1. Create subkey "HKLM\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing\Version". You will need to take ownership of "Component Based Servicing" then give yourself full access permissions before you can create the key.
    2. In the new Version key, create an "expandable value" using the TrustedInstaller ID as its name and the complete path of the folder you identified in WinSxS as its value. Properly you should use %SystemRoot%\WinSxS\whatever instead of C:\Windows\WinSxS\whatever.

    This absolutely fixed my problem with sfc /scannow

    Thank you.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2011-01-10T16:25:34+00:00

    The problem is, that Microsoft Support seems to have been sold out to overseas support and they only know how to search the web and answer questions that already have solutions on the web.  I have an existing case no (1146319490) open on this same issue on my computer, and they have not even found this answer yet to have me try.  Instead, I've got passed around between internet explorer (which won't open and thus services.msc fails to use IE components too).  All they know how to do is an "upgrade install" or "install repair" or some other nonsense.  No one who really understands how the OS works is reachable or responsible for figuring out a repair procedure for these kinds of problems.  There are no "audits" built in or available which can "validate" each services needed configuration/dll set etc.

    Microsoft wonders why the number of people in the Apple stores has grown so large?  I'd guess it is because people are tired of losing their data/lives to this nightmarish problem of "there is no such thing as windows support".

    In the end, my support ticket is still open because I need to find my installation disk so that we can do an "install repair" to fix the missing/corrupted files.  It seems just strange...

    This nonsense has persisted so long in the world of Windows that people just think it is the thing to do...

    Sad state of affairs we have here.


    Wubs

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2010-02-13T17:29:36+00:00

    Hi I have exactly the same problem like TommyPaul  I tried all of the above described and could not go too far away. My problem is that i Have all of the described above windows update DLL files missing.  the only one that I could run was the first one  "REGSVR32 WUAPI.DLL"  the rest show me a warning box like "fail to load, make sure the path is correct".

    I hope somebody can help me out.

    thanks

    vista ultimate spk2  -32bit-

    Was this answer helpful?

    0 comments No comments