[Fix] .EXE Files Open in Notepad or Other App when Double-clicked

Summary: Double-clicking an .exe file may open Notepad or any other application, displaying junk characters. On some systems, the Open with dialog may appear when double-clicking .exe files. This article explains how to fix the .exe file association in Windows 10 and 11.

Did you accidentally use the Default Programs or Open With dialog to associate .exe file types with an application like Notepad? This causes every program to open in that chosen application. Unfortunately, Windows does not provide an option to reset the .exe file associations. You need to fix the association settings using a .reg file or script.

After incorrectly associating .exe files using Notepad, Notepad opens whenever a .exe file is double-clicked. Here is an example:

exe files open in notepad

Or, you may see the “Open with” dialog when you run a program (.exe file).

exe files open with dialog

By default, the Open with option won’t appear in the context menu for executable files. The problem may have happened after the user employed a registry tweak that adds “Open with…” to the context menu for all file types. Despite this problem, you should be able to launch applications by double-clicking on the data files. For example, you should still be able to launch the Microsoft Word application by double-clicking on a .doc or .docx file, but not by running winword.exe directly or clicking the Word program shortcut.

Resolution

To fix the .exe file association issue, delete the UserChoice registry key. This has to be done using a REG file or a script, as trying to launch regedit.exe directly would cause the same problem. Follow these steps:

1) Run exefix_cu.reg

  1. Right-click exefix_cu.reg and choose “Save Link as” in your browser, and download the file to Desktop.
  2. Right-click on the REG file and choose Merge. The .REG file clears the following key, which shouldn’t exist for .exe files.
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.exe\UserChoice

When you use the Open With dialog to associate .exe files with another application, it stores the settings in the above registry key under a value named Progid. The Progid data will contain the application’s exe file name (Applications\Notepad.exe, Applications\iexplore.exe, or a Programmatic Identifier such as txtfile, jpegfile, etc).



2) Run exefix.reg

If the above fix doesn’t help, download exefix.reg (right-click and “Save link as” in your browser) and run it. Click Yes to confirm.

(The registry fix restores the .exe file association settings in Windows 10 and 11.)

Ignore the following error:

Cannot import exefix.reg: Not all data was successfully written to the registry. Some keys are open by the system or other processes, or you have insufficient privileges to perform this operation.

See if that fixes the .exe association settings.

Related article: How to Remove a File Association Using the Registry Editor?


One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time.

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a ten-time recipient of the Microsoft MVP award in Windows Desktop Experience (Windows Shell), from 2003 to 2012. Ramesh founded Winhelponline.com in 2005.

14 thoughts on “[Fix] .EXE Files Open in Notepad or Other App when Double-clicked”

  1. JUst did this because I am using Windows in a foregin language. Don’t know why the association got redirected, but thanks so much for this quick fix!!

    Reply
  2. Thank you so much! My laptop is working again! My situation was especially nasty, as I accidentally set file exlporer to open .exe, so I was finally able to copy the registry editor to a USB and luckily file explorer still worked so I was able to open it.

    Reply
  3. Ahhhh! I think we fixed it!!! File Associations were all messed up! My kid decided to mess with the webcam on my laptop & somehow changed the Open With to Windows Photo Viewer….somehow it defaulted EVERYTHING to opening with that. I have been going nuts!

    Reply

Leave a Comment