Categories About Us Contact Us Become a Member

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.

By Neeraj Singh ~6 min Updated Jun 2026 88% found this helpful
Error message
Error 2: ERROR_FILE_NOT_FOUND. The system cannot find the file specified.
Summary

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.

What this error means

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.

Common causes

The file was moved or deleted.
A shortcut or script points at an old path.
A program was uninstalled or installed incompletely.
A service's ImagePath points at a missing executable.
A missing or corrupt Windows system file.
A typo in the path or filename.
Expert insight

“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.”

How to fix it

Method 1

Verify the path or shortcut

1Check the exact path the program, shortcut or command is using.
2Correct it if the file has moved, or update the shortcut's Target.
3Watch for typos in the filename or folder.
Method 2

Restore the missing file

1If the file was deleted, restore it from the Recycle Bin, a backup, or File History.
2Reinstalling the owning program also replaces it.
3Confirm the file now exists at the expected path.
Method 3

Reinstall the program

1If the file belongs to an app, uninstall and reinstall the app cleanly.
2This replaces missing files and rebuilds correct paths.
3Restart and retry.
Method 4

Fix a service that points at a missing file

1If a service throws error 2, check its ImagePath in HKLM\SYSTEM\CurrentControlSet\Services\<service>.
2Correct the path to the real executable, or reinstall the service's software.
3Then start the service.
Method 5

Repair missing Windows files

1If a Windows component is missing, run:
sfc /scannow
DISM /Online /Cleanup-Image /RestoreHealth
2These restore missing or damaged system files.
3Reboot and retry.

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.

Frequently asked questions

What does Windows error 2 mean?
ERROR_FILE_NOT_FOUND, the system cannot find the file specified. A program, service or command pointed at a file or path that does not exist where it was expected.
How do I fix error 2?
Find which file is being looked for, then restore it or correct the path. Reinstall the owning app, fix a service's ImagePath, and run SFC and DISM for missing Windows files.
Why does a service give error 2?
Its ImagePath in the registry points at an executable that is missing or has moved. Correct the ImagePath under the service key, or reinstall the software that provides the service.
A shortcut causes the error, what do I do?
Right-click the shortcut, open Properties, and check the Target path. Update it to the file's current location, or recreate the shortcut from the actual program.
How do I restore a deleted file?
Check the Recycle Bin first, then a backup or File History. Reinstalling the program that owns the file is a reliable way to replace it.
Could this be a Windows file?
Yes. A missing or damaged system file can cause error 2. Run sfc /scannow and DISM /Online /Cleanup-Image /RestoreHealth to restore Windows components.

Still not working?

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.

Was this fix helpful? Thanks for your feedback!