How to fix Windows error 2 (ERROR_FILE_NOT_FOUND)
This means Windows looked for a file at a given path and it was not there. Restoring the file or correcting the path fixes it. Jump to your situation below or work through the methods in order.
This means Windows looked for a file at a given path and it was not there. Restoring the file or correcting the path fixes it. Jump to your situation below or work through the methods in order.
Error 2 (ERROR_FILE_NOT_FOUND), the system cannot find the file specified, means a program, service or command pointed at a file or path that does not exist where it was expected. The file may have been moved, deleted, or never installed, a service's ImagePath in the registry may point at a missing executable, or a shortcut or script may reference an old location. The fix is to find out which file is being looked for, then either restore it, correct the path that points at it, or reinstall the program that owns it. For a service, check and fix its ImagePath. SFC and DISM restore missing Windows files. Once the path resolves to a file that actually exists, the error clears.
This is one of the most literal Windows errors: something asked for a file by its path, and Windows looked there and found nothing. The request itself was valid; the file at that location is simply absent.
The question is always which file and why it is missing. It might have been deleted or moved, left behind by a bad uninstall, or pointed at by a stale path in a shortcut, script or service registration. Restoring the file or fixing the path that names it resolves it.
“Error 2 is Windows being honest: I looked where you told me and the file is not there. So the whole job is finding which file and why it is gone. Often a shortcut or a script still points at an old folder, or an uninstall took the file but left the registration behind. I restore the file or fix the path that names it. For a service, I check its ImagePath in the registry, that is a classic culprit. And SFC plus DISM cover any missing Windows files.”
HKLM\SYSTEM\CurrentControlSet\Services\<service>.sfc /scannow DISM /Online /Cleanup-Image /RestoreHealth
Error 2 means a file is missing at the path that was requested, so identify which file and either restore it or correct the path that names it. Reinstall the owning program for app files, fix the ImagePath for a service, and run SFC and DISM to restore missing Windows files.
If you cannot tell which file is missing, Process Monitor (from Microsoft) can capture the exact path that returns NAME NOT FOUND, which pinpoints what to restore. You can also submit your error to us for a tailored fix.