Windows cannot find '?.exe' - some apps only

3

4

Lately, I've been having this problem where Windows was informing me that a file did not exist. For example, if I were to open up my-image.png from explorer, it would tell me that it wasn't found. Now, Picasa Photo Viewer had taken over the extensions, which is what I wanted when I installed it. So, I went to Picasa's Program Files Directory, and tried opening the viewer manually. This time, I was told that the app could not be found, even though I'd just double-clicked it.

Over time, more EXE files started doing it. I found that if I rename the EXE, it works. But the second I change it back, it "can't find" it again.

I don't have any viruses on my PC, everything else is performing fantastically.

Edit - This is happening with RAD Studio now as well.

Here's a snapshot of the error with bds.exe selected:

Cannot find file

Edit 2 - Also, I have checked the exefile and .exe associations in the registry, and those are fine (set correctly).

It's just weird that most apps open, but BDS does not. Command line can't open it either.

Mike Rockétt

Posted 2013-04-29T05:34:53.640

Reputation: 363

I would advise you to check for viruses and malware again. Also check your hard disk and RAM. – Karan – 2013-04-29T14:10:38.450

I have done so already. My hard drives are fine, and my RAM is perfect. This looks to be software thing to me. Unfortunately, I can't find anyone else who has/had the same problem. – Mike Rockétt – 2013-04-29T16:40:54.693

have you used chkdsk, maybe the NTFS metadata have an issue – magicandre1981 – 2013-05-01T07:31:19.480

Suggestions for some tests: (1) Disable or even uninstall your antivirus, (2) Look at the permissions on these files, (3) Look for interesting messages in Event Viewer, (4) Does this happen when booting in Safe mode? – harrymc – 2013-05-01T07:57:53.003

@harrymc I'll give the last three steps a try now. I've already tried the first one. – Mike Rockétt – 2013-05-01T09:04:22.947

@magicandre1981 I have tried that already. There were other bugs, but it did not fix this issue. – Mike Rockétt – 2013-05-01T09:05:23.390

Those steps did not help, but Sergey's answer below did. Thanks for helping. :) – Mike Rockétt – 2013-05-01T09:32:49.137

Do you like having your question protected by Community? – gparyani – 2013-12-13T01:29:39.750

Does it make a difference? – Mike Rockétt – 2013-12-13T05:10:14.093

Community protects a question if it has three deleted answers from new users. I helpfully flagged one of this question's answers as not an answer, and that caused it to be protected by Community. – gparyani – 2013-12-13T06:08:21.873

Answers

11

Check the following registry key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options

On a 64-bit system there is a second copy of this key for 32-bit applications:

HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Image File Execution Options

This key can be used to launch a debugger automatically when the specified application is started (see also this and this for more information). However, if the Debugger value in a subkey of this key points to a nonexistent file, any attempts to start the EXE file with the same name as the subkey will fail with a “file not found” error.

If you see any subkeys which should not be there, delete them (after making a backup of the registry key contents). In a clean Windows 7 installation there are two subkeys under this key:

  • DllNXOptions — contains a list of DLLs that are known to be incompatible with DEP;
  • IEInstal.exe — contains ExecuteOptions=0x00000000 (this value does not seem to be documented).

Some malware may use this key to disable important system components (e.g., explorer.exe) and antimalware programs, and sometimes antimalware programs remove the malware executable files, but leave registry keys under Image File Execution Options pointing to the location of those files, which will result in the errors you are seeing.

Sergey Vlasov

Posted 2013-04-29T05:34:53.640

Reputation: 2 678

I had this problem and found solution myself, then found your answer. This answer should be first result in google, great solution. Images to help: https://pbs.twimg.com/media/D0WGxpSWwAAsGn3.png, https://pbs.twimg.com/media/D0WGxpAW0AAkgxR.png

– rvnlord – 2019-02-26T16:40:39.457

Sergey, you have saved me. Turns out it was the Tuneup Utilities Program De-activator. Somehow, it disabled a whole bunch of apps. I have two version of Delphi installed: 7 and XE. No idea how it happened, but when I disabled 7, it disabled XE as well (along with countless others). Works perfectly now, thanks. :) – Mike Rockétt – 2013-05-01T09:32:04.150