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
    2010-12-25T10:12:02+00:00

    HiTommyPaul,

    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 Forumand let us know what you think.

     

    Whoever Mike from Microsoft Support Engineers is, you should know that this is not the answer.  To my knowledge, the only answer is to restore the computer to factory default and start over.  I have tried every fix you put up and then some.  I have searched every where on the web to find an answer and can't.  Unfortunately, I can't restore my laptop to factory defaults.  My screen is broken and the laptop has been discontinued.  I run it through my TV and can't afford to get a new one because of this poor economy.  So I, like many people out there have to make due with what I have.  We all need a good true answer to this problem.  There has to be a way for somebody to come up with a valled work-around for this issue, or to give us a way to manualy download the updates wee need.  BUT THE WORST THING YOU CAN DO IS SAY THAT THE ABOVE IS THE ANSWER, WHEN AS YOU CAN SEE, IT HASN'T HELPED ANYONE.  BUT THEN AGAIN, I'M SURE NOBODY AT MICROSOFT EVEN PAYS ATTENTION TO THESE THREADS AFTER IT HAS BEEN MARKED AS SOLVED.  SO I'M SURE I JUST WASTED ANOTHER 5 MINUTE OF MY LIFE TYPING THIS OUT FOR NOBODY TO READ.

    Was this answer helpful?

    10+ people found this answer helpful.
    0 comments No comments
  2. 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
  3. Anonymous
    2011-01-10T16:52:16+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

    I guess that means it's time for all of us to boycot windows and start buying Apple products.  And the funny thing it,  I search apple .dll's on the web, or go to apple support, I get everything I could ever want and mere.  You can copy these files from your friends who have the same opperating system, and install them with no problem.  I have given up on fixing the problem with the laptop that I have this problem on.  I have a toshiba with windows 7 on it that works fine.  I have the recovery disks and I made the repair disks and a system immage and backup on it.  In about 2 or 3 years when the processor finnaly fails on it, I will buy an Apple and will be done with Windows forever.

    IF MICROSOFT WANTS TO KEEP THEIR LOYAL CUSTOMERS LIKE ME, THEN THEY NEED TO GET REAL TECHNICIANS HERE IN THE UNITED STATES WHO KNOW THE SYSTEM INSIDE AND OUT TO ASSIST US IN FIXING THESE PROBLEMS.  WE ARE ALL TIRED OF THIS AND WE'RE NOT GOING TO KEEP WASTING OUR MONEY ON THIS NOW INFERIOR PRODUCT JUST BECAUSE IT IS A LITTLE MORE COMPATABLE WITH THE WORLD THE APPLE IS.  AT THIS POINT, APPLE IS 98% COMPATABLE WITH EVERYTHING OUT THERE AND 98% IS GOOD ENOUGH FOR ME.

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  4. 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