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, causing every program to open in that chosen application? Windows provides no option to reset the .exe file associations. You need to fix the association settings using a REG file.
After incorrectly associating .exe files using Notepad, Notepad opens every time when a program was launched, using the original program’s file name as the argument.
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” which 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 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.
Fix .EXE File Association (UserChoice key)
To fix the problem, delete the UserChoice registry key using a REG file or a script, as trying to launch Regedit.exe directly would cause the same problem. 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, the settings are stored in the above registry key. There will be a value named Progid in the right pane. 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 helps!
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 the ITeS industry — delivering support for Microsoft's consumer products. He has been a Microsoft MVP [2003 to 2012] who contributes to various Windows support forums.