Summary: Double-clicking .exe or .lnk (shortcut) files may open Notepad or any other application, displaying junk characters.
Did you accidentally use the Default Programs or Open With dialog to associate .exe file types with some application like Notepad? This causes every program to open in that chosen application. Unfortunately, Windows provides no 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 every time when a .exe file is double-clicked. Here is an example:
[Solution] .EXE Files Open in Notepad when Double-clicked
To fix the problem where .exe files open with Notepad of any other program, 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:
- Download exefix_cu.reg, and save it to Desktop.
- Right-click on the REG file and choose Merge.
The .REG file clears the following key, which shouldn’t exist for .exe files.
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).
Hope the information helped you fix .exe file association problem in Windows.
Related article: How to Remove a File Association Using the Registry Editor?
About the author
Ramesh Srinivasan founded Winhelponline.com back in 2005. He is passionate about Microsoft technologies and has a vast experience in Windows — delivering support for Microsoft's consumer products. He has been a Microsoft MVP (2003-2012) who contributes to various Windows support forums.