Comprehensive Fix For Error 126 in your Windows

Rename SoftwareDistribution Folder

WuAuServ is known automatic updates service. Since SoftwareDistribution folder is used by this service, you won’t able to rename it until the service is stopped. Stop the service, rename the folder and then re-start it again. This will fix 126 error in WIndows 8 and previous versions.

  • Open Command Prompt as administrator. (Refer above paragraph for required steps)
  • Type the following commands and press ENTER:
    net stop WuAuServ
    cd %WinDir%
    ren SoftwareDistribution SD_OLD
    net start WuAuServ
    exit
  • Restart your computer again.

Change Dark Souls Game Settings

Dark Soul game shows error 126 due to problems with its settings. Modify DSfix.ini file as under:

For Windows 8.1/ 8 and Earlier Versions:

  • Double click My Computer desktop icon.
  • Open the following directory:
    C:\Program Files (x86)\Steam\steamapps\common\Dark Souls Prepare to Die Edition\DATA
  • Right click “DSfix.ini” file, select Open With | Notepad.
  • Click Edit | Replace.
  • Insert the following value in the Find What box:
    dinput8dllWrapper none
  • Insert following value in the Replace with box:
    dinput8dllWrapper dscfix.dll
  • Click Replace.
  • Right click “DSCfix.ini” file from the same location, select Open With | Notepad.
  • Click Edit | Find.
  • Type following value in “Find what” textbox:
    ;dInput8Chain = dsmfix.dll
  • Click Find Next.
  • From the command given in the Step 10, remove the semicolon (;) which is the very first character.
  • Click File | Save.
  • Close the document.

Exclude Dark Soul Game Files from DEP

Add all .EXE files from the Dark Soul game directory to DEP excluded files list. Some files could have conflicts with Windows security feature Data Execution Prevention (DEP). Fix error 126 as follows:

For Windows 8.1/ 8 and Earlier Versions:

  • Right click My Computer desktop icon.
  • Select Properties.
  • Click “Advanced system settings”.
  • Click Advanced tab, and then Settings (Performance).
  • Click Data Execution Prevention tab.
  • Select the last option, i.e. “Turn on DEP for all programs except those I select”.
  • Click Add, browse the following folder:
    C:\Program Files (x86)\Steam\Steamapps\Common\Dark Souls Prepare to Die Edition\DATA
  • Locate and add every Executable File (.dll) from this directory.
  • When you’re done adding all .EXE files, click OK | OK.

Rename Corrupt DLL File

A DLL file located in the iTunes installation directory can be corrupt. Rename the following files and start iTunes again.

For Windows 8.1/ 8 and Earlier Versions:

  • Double click My Computer desktop icon.
  • Open the following location:
    C:\Program Files (x86)\iTunes
    OR
    C:\Program Files\iTunes
  • Rename a file called “QTMovie.DLL” as “QTMovie.DLL.OLD”

Reinstall iTunes

Uninstall and reinstall iTunes software in your Windows 8/Windows 7 to fix error code 126 as shown under:

For Windows 8.1/ Windows 8:

  • Press Windows Key + X.
  • Click Programs and Features.
  • Right click iTunes, select Uninstall option.
  • Follow the wizard.
  • Restart.
  • Download a fresh setup from the official website.

For Earlier Versions of Windows:

  • Click Start, type “Uninstall a program”
  • Press ENTER.

Other steps remain the same.

Configure TrustedInstallerID Registry Entries

You’ll get your TrustedInstallerID as the sub folder name in the “Version” folder. Another thing you’ll have to find the name of a required sub folder in the “WinSxS” folder. Then you’ll open Registry Editor and make appropriate TrustedInstallerID registry entries containing both these information to fix 126 error code.

For Windows 8.1 and Windows 8:

  • Double click My Computer desktop icon.
  • Open the following directory:
    C:\Windows\Servicing\Version
  • You’ll find a sub folder named something like 6.2.9200.16683. This is your TrustedInstallerID.
  • Note the TrustedInstallerID to a Notepad document. Just copy-paste.
  • Open the following directory:
    C:\Windows\WinSxS
  • You may find the following folder. Replace “TrustedInstallerID” with the appropriate value that you noted down in the Steps 3-4.

  • For 32 Bit Version of Windows:
    x86_microsoft-windows-servicingstack_31bf3856ad364e35_TrustedInstallerID_none
    For 64 Bit Version of Windows:
    amd64_microsoft-windows-servicingstack_31bf3856ad364e35_TrustedInstallerID_none

  • Note the name of the actual sub folder to a Notepad document.
  • Press the Windows Key.
  • Type “RegEdit” in the Search Box.
  • Click the Apps icon.
  • Open Registry Editor from the Search Results page.
  • Locate the following Registry path:
    HKLM\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing
  • Right click “Component Based Servicing” key, select New | Key.
  • Type “Version” as the sub key name and press ENTER.
  • Right click “Version” sub key, select New | String Value.
  • Type the TrustedInstallerID that you noted in Steps 3-4 as the string name. Press ENTER.
  • Double click the new string, type the sub folder name that you noted in the Steps 6-7. Press ENTER.
  • Close Registry Editor.
  • Restart your computer.

Note: In the Step 13, some users may receive an error “Cannot create key: You do not have the requisite permissions to create a new key under Component Based Servicing”. In such a case, either close and re-open RegEdit as an administrator (Right click it in the Search Results page and then click “Run as administrator” icon); or right click concerning key, select Permissions and allow administrative privileges.

For Earlier Versions of Windows:

Opening Registry Editor:
Click Start, type “RegEdit” and press ENTER. All other steps remain the same.

Make AMD Catalyst Registry Entries

Error code 126 appears in Windows 8, Windows 7 when AMD Catalyst Radeon video driver fails to make a required Registry entry. You’ll have to make these entries in order to fix ‘126’ issue. Create a Registry File (.reg) which will simplify your task by doing it automatically.

For Windows 8.1 and Windows 8:

For 32 Bit Version of Windows:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000]
"OpenGLVendorName"=hex(7):61,00,74,00,69,00,6f,00,67,00,6c,00,78,00,78,00,2e,\
00,64,00,6c,00,6c,00,00,00,61,00,74,00,69,00,6f,00,67,00,6c,00,78,00,78,00,\
2e,00,64,00,6c,00,6c,00,00,00,00,00

For 64 Bit Version of Windows:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000]
"OpenGLVendorName"=hex(7):61,00,74,00,69,00,6f,00,36,00,61,00,78,00,78,00,2e,\
00,64,00,6c,00,6c,00,00,00,61,00,74,00,69,00,6f,00,36,00,61,00,78,00,78,00,\
2e,00,64,00,6c,00,6c,00,00,00,00,00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000]
"OpenGLVendorName"=hex(7):61,00,74,00,69,00,6f,00,36,00,61,00,78,00,78,00,2e,\
00,64,00,6c,00,6c,00,00,00,61,00,74,00,69,00,6f,00,36,00,61,00,78,00,78,00,\
2e,00,64,00,6c,00,6c,00,00,00,00,00

  • Press the Windows Key.
  • Type “Notepad” in the Search Box.
  • Click the Apps icon.
  • Open it from the Search Results.
  • Notepad will open. Copy-paste the following information in your Notepad file.
  • Click File | Save.
  • Type the file name as “RegFix.reg”, select File Type: All Files and Directory: Desktop.
  • Click the Save button.
  • Close Notepad, go to your desktop and double click this newly created Registry file.

For Earlier Versions of Windows:

  • Click the Start button.
  • Point to All Programs | Accessories.
  • Select Notepad.

All other steps remain the same.

Reregister Windows Update DLL Files

Windows Update DLL file registration entries can be corrupt. You get Windows 7/8 error 126 when Windows Update file registration entries are unregistered from the Registry. You’ll have to re-register them again with the help of Command Prompt.

For Windows 8.1 and Windows 8:

  • Press the Windows Key.
  • Type “Command Prompt” in the Search Box.
  • Click the Apps icon.
  • Select it in the Search Results page.
  • Click “Run as administrator” icon at the bottom of the page.
  • Command Prompt will as administrator.
  • Type the following command and press ENTER: REGSVR32 WUAPI.DLL
  • Do you received a message “DLLRegisterServer in WUAPI.DLL succeeded.”? If yes, type the following commands and press ENTER after each command.
    REGSVR32 WUAUENG.DLL
    REGSVR32 WUAUENG1.DLL
    REGSVR32 ATL.DLL
    REGSVR32 WUCLTUI.DLL
    REGSVR32 WUPS.DLL
    REGSVR32 WUPS2.DLL
    REGSVR32 WUWEB.DLL
    EXIT
  • Restart your computer for the changes to take effects.

For Earlier Versions of Windows:

Opening Command Prompt as administrator:

  • Click the Start button.
  • Point to All Programs | Accessories.
  • Right click Command Prompt, select “Run as administrator”.

All other steps remain the same.