Search code examples
c++mfcwindows-xpdouble-clickfile-association

File association issue when double-clicking (Windows message popping)


When we double-click on a file (extension .AQ9) from our own application (developped in MFC C++), we receive this message:

Windows cannot find "name of the file.AQ9". Make sure you typed the name correctly, and then try again.

But the file opens anyway without problem (we just close the message and continue to work). We maintain this application for quite a while now (several years, like 15 years) and it's just recently that we have this message only in Windows XP. I don't know what changed exactly on our side since we don't know exactly when it started and the application has more than 2 millions line of code. Also, we create the setup using Install Shield, so maybe it's related to this (but we use this for the latest 10 years without any problem)

The file association seems fine, since it opens the file anyway. If the application is already opened and that we double-click on the file, no message is shown.

My guess is that the slight delay of the splash screen may scare Windows XP in thinking that the file cannot be opened but it's like less than a second... If it's the case, is there a way to specify somewhere a "timeout" before this message is shown? At least for our application.

I've also check in the windows event log but there is nothing I can see about this error.

This question looks like this one but he still gets the message when the application is already launched, which is not my case.


Solution

  • I had a similar problem this year, with the same symptoms, and I was able to get rid of the message by removing the "ddeexec" registry entry associated with the sofware (in your case : HKEY_LOCAL_MACHINE\SOFTWARE\Classes\your software.Document\Shell\Open\ddeexec)

    I'm not sure why it worked well before. I suspect a windows update to be the culprit :P