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

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:

.exe files open in notepad or any other application
Chrome’s executable file opened in Notepad when Chrome icon was double-clicked
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.

[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:

  1. Download exefix_cu.reg, and save it 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).



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 he has been a Microsoft Most Valuable Professional (MVP) for 10 consecutive years from 2003 to 2012.

75 thoughts on “[Fix] .EXE Files Open in Notepad or Any Other Application when Double-clicked”

  1. Buddy thank you so much, i have spent the last 4 hours trying to fix this! You just saved me around $10,000,00 in lost clients that was due to this stupid vista bug, now i can continue with my work and meet my deadline.

    Thanks again buddy best wishes for you. Keep doing what your doing. 🙂

  2. Deu certo, obrigado! (portuguese)
    Thank you, my problem is resolved
    Quase que precisei formatar meu pc, mas vocês me salvaram. 😀 (portuguese)

  3. awesome!I was one step away from throwing my fairly new computer out of my 2nd story window.been dealing w/ it for 2 days

  4. Thanks a lot. You’re the best. Please, is there any other thing i can know about my system? This problem really made me look like a dummy… I need web references please where i can learn other new stuff. Thanks.

  5. Thank you, I have been many places and been offered to buy many fixes and this took 3 min and now i am completely fixed! Thank you so much 🙂

  6. DUDE YOU ROCK, I tried a couple other ways from other sites & all they did was drive me out of my freakin mind. I tried it it your way and in like 2 minutes it was completly fixed. Thanx Again, I can unload my gun now, I apparantly wont be needing it.

  7. OMG! YOU’RE MY SAVIOR! My nephew played with my dekstop and screwed my .exe files and that’s ALL what a computer is all about. Good thing I was able to open an internet browser and had an access with this very useful article! MUCH THANKS!

  8. Holy cow! I was about to have a heart attack! When everything got defaulted to Windows media center microchips were about to be exposed. The shortcuts still say IE explorer but I can live with that…everything works fine now. Thank you!

  9. THANK YOU SO VERY MUCH!! Two Days Ago, I Installed IE9, and it apparently went and associated ALL of my .EXE Files to Internet Explorer. Of Course, None of my Diag/fixit Tools (ccleaner, Regedit, etc) would run because they are all .exe’s. FINALLY in Desperation, I searched google and found your Blog Entry. YOU saved me from having to do a full blown factory restore and then spending days rebuilding everything … I am SO Grateful!

  10. how do you do this: You need to delete the UserChoice key above using a REG file or a script. Download exefix_cu.reg, and save it to Desktop. Right-click on the REG file and choose Merge.

  11. Thanks a lot , finally i fix the problem by this (exefix_cu.reg) for my Windows7 Editio Integrale !
    all what i do just download it and after just click on it and ok, ok, ok……. SOLUTION!
    thaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaanx

  12. I have a laptop with Windows XP Pro SP3. Will this fix work there, too?
    Many kind regards,
    Timothy Smith
    P.S. If it does, you are an angel in disguise…

  13. wow thaaaaaaaaaaank you i was on the edge of crying and you saved me you are divine thanks you saved my life \
    you rockkkkkkkkkkkkkkkkkkkkkkkkkk!!!!!!!!

  14. its a miracle for me to find this help much helpful.I was so desperate to surf on the internet to find the solution then im glad its come..i was almost deciding to reinstall the OS ,and thanks ive never came to that point!

  15. wonderfulllllll…. you guys are marvelous, people say Good of you from a Distance. you wont go unrewarded thank you so much and God Bless

  16. I downloaded the .reg file and did r-click Merge, and refreshed the icons, but nothing changed. I still have most of my desktop shortcuts with the same icon and opening the same program.
    The first half of the post seems to be saying there’s more I need to do (reset the .exe files manually?) but I don’t know how to do this. Please help!

  17. Wow, this worked like a charm, THANK YOU!! It was a little tricky to download the file, since I couldn’t open any browser with Notepad (ugh). So I created the .reg file on another Windows device using Notepad (my nemesis!), transferred that to my Kindle, then copied from the Kindle to the Windows 7 desktop on the sick machine. Right click to Merge… let it do it’s thing. Restarted the device, held my breath (for a what seemed like an eternity), and all is well. Whew! Much appreciated!

  18. I was able to open regedit.exe from a DOS window & followed your steps. Worked like a champ, thank you, thank you, thank you so very, very much. It’s BS Windows 7 “Open With, Browse” has the box (always use this program…) greyed out, thus setting you up for these kind of problems. Thank you very much Windows, NOT!!!

  19. Restarted pc just now, so far so good, all software logo/icon had returned to how it was. No(as I checked so far) data lost, all fine. Thank you again!

  20. Hi Barry,
    Thanks for your response to my windows media problem.
    Unfortunately it all came to nothing.
    I went through the steps as suggested, but all my computer desktop items still remain as previously stated “when opened the only offering is to play music from the library”!!!
    Does anybody else have any suggestions, as to how I might solve the problem??
    Any assistance would be greatly appreciated.
    Thanks, regards.
    Bob.

  21. Excellent tip! I had .xlsx files opening in windows explorer, and the default programs tool in the control panel doesn’t list that file type, so luckily I found this tip!

  22. Why is there no download dialog box when I click on the download link provided? It only opens a page with these on:

    “Windows Registry Editor Version 5.00

    [-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.exe\UserChoice]”

    • @Art: Right-click on the link and choose “save target as” (or equivalent option) in your browser.

  23. 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!!

  24. 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.

  25. 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!

Leave a Comment