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: Oldest
  1. Anonymous
    2009-10-30T19:45:49+00:00

    Hi TommyPaul,

    Thank you for visiting Microsoft Answers.

    I have few steps which might help you.

    Method 1

    Check if Windows Update Service is selected as start.

    To do this, follow these steps:

        1.Click on Start, Run and type the following command in the open box and click OK.

          In services.msc find the Automatic Updates service and double-click on it.

    1. Click on the Log On Tab and make sure the "Local System Account" is selected as the logon account   and the box for "allow service to interact with desktop" is UNCHECKED.
    2. Under the Hardware Profile section in the Log On Tab, make sure the service is enabled.

      3. On the General Tab, the Startup Type should be Automatic, if not, drop the box down and select   Automatic.

     4. Under "Service Status" on the General tab, the service should be Started, click the Start button enable it.

     Repeat the steps above for the service "Background Intelligent Transfer Service (BITS)".

    Method 2

    You may also re-register Windows Update DLLs.

    To do this, follow these steps:

        1.Click on Start, Run, and type CMD and click ok

        2.In the black command window type the following command and press Enter

          REGSVR32 WUAPI.DLL

         Wait until you receive the "DllRegisterServer in WUAPI.DLL succeeded" message and click OK.

        * Repeat the same step for each of the following commands:

          REGSVR32 WUAUENG.DLL

          REGSVR32 WUAUENG1.DLL

          REGSVR32 ATL.DLL

          REGSVR32 WUCLTUI.DLL

          REGSVR32 WUPS.DLL

          REGSVR32 WUPS2.DLL

          REGSVR32 WUWEB.DLL

    Method 3

    Remove the corrupted Windows Update Files. To do this, follow these steps:

        1. At the command prompt, type the following command and press Enter

          net stop WuAuServ

        2.  At the command prompt,

          type cd %windir% and press Enter

        3. In the opened folder, type the following command and press Enter to rename the  Software Distribution Folder

          ren SoftwareDistribution SD_OLD

        4.Restart the Windows Update Service by typing the following at the command prompt

          net start WuAuServ

     Type Exit and Press Enter to close the command prompt.

    1.       Reboot the computer and check if you have similar issue.

    2.       Hope the information helps. Please post back and let us know.

    3.       Regards,

     Debleena S

    Microsoft Answers Support Engineer

    Visit our Microsoft Answers Feedback Forum and let us know what you think.

    Was this answer helpful?

    4 people found this answer helpful.
    0 comments No comments
  2. 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
  3. Anonymous
    2010-08-11T19:15:34+00:00

    And as usual for this site, another problem goes unanswered.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2010-11-16T13:32:12+00:00

    "Windows Modules Installer It gives me the error:126 The specified module could not be found."

    Hmmm Lets look at the description for the Windows Modules Installer.

    "Windows Modules Installer:

    Description:

    Enables installation, modification, and removal of Windows Updates and optional components.  If this service is disabled, install or uninstall of Windows updates might fail for this computer."

    So, how do you expect repairing windows updates fix the issue?  Please, help me understand dear "Microsoft Answers Support "ENGINEEEER"?"

    Anyway, I have been looking for a solution to repair Windows Modules Installer service and so far no luck.  Windows Restore did not fix it. Copying it from another system did not fix it.  Removing the service and re-creating it via SC.exe command did not fix it either.  Checked registry keys and comapared it with a working system and it looked the same.  Permissions on both registry keys and files also the same.  I shall post back if solution is found.

    Cheers fellas.

    Was this answer helpful?

    0 comments No comments