How to fix Windows error 126 (ERROR_MOD_NOT_FOUND)
This means a program tried to load a DLL or module that is missing or unreadable. Restoring the dependency fixes it. Jump to your situation below or work through the methods in order.
This means a program tried to load a DLL or module that is missing or unreadable. Restoring the dependency fixes it. Jump to your situation below or work through the methods in order.
Error 126 (ERROR_MOD_NOT_FOUND), the specified module could not be found, means a program or service tried to load a DLL or module that is missing, in the wrong place, or cannot be read. It usually comes from a missing dependency, very often a Visual C++ Redistributable the app relies on, a DLL that was deleted or removed by antivirus, or a registration that points at a module that no longer exists. The fix is to identify and restore the missing module: reinstall or repair the program, install or repair the Visual C++ Redistributables (and other runtimes the app needs), restore a deleted DLL, and re-register a DLL with regsvr32 where appropriate. SFC and DISM cover missing Windows DLLs. Once the required module is present and readable, error 126 clears.
Programs are built from many modules. When one starts, Windows loads the DLLs it depends on. Error 126 means one of those required modules could not be found or loaded, so the program cannot continue.
The missing module is most often a shared runtime, the Visual C++ Redistributables are the classic example, or a DLL that was deleted, quarantined by antivirus, or left dangling by a bad install. Restoring or reinstalling that dependency, rather than the whole system, is what fixes it.
“Error 126 is a missing-dependency error: the app reached for a DLL and it was not there. The number one cause I see is a missing Visual C++ Redistributable, so I install or repair those first and a huge share of cases just vanish. After that it is a DLL that got deleted or quarantined by antivirus, which I restore, or a stale registration I clean up. Reinstalling the app cleanly fixes the rest. It is rarely the whole of Windows, just one absent module.”
regsvr32 name.dll
sfc /scannow DISM /Online /Cleanup-Image /RestoreHealth
Error 126 is a missing module, so restore the dependency rather than reinstalling Windows. Install or repair the Visual C++ Redistributables first since they fix a large share of cases, then reinstall the app, restore any DLL antivirus quarantined, and run SFC and DISM for missing system DLLs.
If you cannot tell which module is missing, a dependency analyser such as Dependencies (the modern Dependency Walker) shows exactly which DLL the program fails to load, so you can target it. You can also submit your error to us for a tailored fix.