TechJunkie is a BOX20 Media Company

Home PC Windows Files Keep Opening in Notepad? Here’s How to Assign Files to the Right Program

Files Keep Opening in Notepad? Here’s How to Assign Files to the Right Program

Files Keep Opening in Notepad? Here's How to Assign Files to the Right Program

True, some malware will make your computer open .exe files with Notepad. However, this doesn’t have to be due to a virus. Your PC may be perfectly healthy, and it still may have this issue.

Most likely, you or somebody else has changed the .exe settings in Folder Options. Here’s how to solve this problem.

A Temporary Fix

This fix is not something permanent. However, if you’re in a hurry and need to use an app without it running in Notepad, this is a quick way to do it. Right-click the app’s icon, and select Open with… Then, select the program you want to run it with from the list.

Using a Pre-Made Registry Script

The most straightforward and simple option would be downloading a pre-set registry script that will automatically solve this issue for you. However, you’re going to have to dig around a bit for this. Another problem is that you need to make sure that the script is safe. Download it only from trusted online locations.

All this may significantly limit your search. So, you may be inclined to edit the Windows registry manually.

Maybe you want to get your hands dirty and fix this issue yourself. Although it may seem a bit complicated, as long as you follow the instructions in this article carefully, you’ll solve this problem in no-time.

Using Command Prompt

This method will require some typing in Command Prompt, but it’s probably the quickest one available. Open Command Prompt. To do this, click Start and type in “Command Prompt.” Alternatively, press Win + R to have a Run dialog box appear. Then, type “cmd” or “command” in it and press Enter.

files keep opening in notepad - how to assign to right program

Inside Command Prompt, enter “assoc .exe=exefile” and hit Enter. That should fix the problem very quickly.

Editing Windows Registry Manually

In Command Prompt, type “cd\windows” and press Enter. This command should activate the Windows folder. Now, type in “regedit” and hit Enter. That will open the Registry Editor.

Once in Registry Editor, navigate to this key: HKEY_CLASSES_ROOT\.exe. Then, in the right pane, switch the value of Default to exefile.

Then, navigate to HKEY_CLASSES_ROOT\exefile\shell\open\command. In the pane to the right, change the Default value to ““%1” %*.”

Exit and restart your computer. That should fix the Notepad issue.

Using Easy Fix Tools

For those who don’t want to deal with finding scripts online, mess around Command Prompt, and Registry Editor, Microsoft used to have a simple solution. Unfortunately, these tools and solutions got discontinued. It doesn’t rely on the standard troubleshooter to fix this type of issue anymore.

If you want to try the troubleshooter, click Start, go to Settings, and navigate to Update & Security. On this screen, click Troubleshoot.

It will prompt you to select the type of troubleshooting that you want to perform. After you’ve selected everything, click Run the troubleshooter.

The troubleshooter will take some time to do its job, so sit tight and give it a few minutes. The tool may prompt you to answer a few questions along the way. Unfortunately, this feature isn’t always successful, so you may have to resort to one of the options mentioned above, after all.

files keep opening in notepad

Fixing the Notepad Issue

There are several ways to solve the problem with Notepad opening .exe files. You are encouraged to run the Windows troubleshooter, but you may have to resort to one of the other solutions on the list if it fails to fix things.

Has this article been helpful? Have you solved the issue with .exe files? Do you have another solution? Feel free to hit the comment section and add any questions, thoughts, or advice that you may have.

The Best Chrome Extensions to Download or Manage Images [May 2020]

Read Next 

Leave a Reply

Your email address will not be published. Required fields are marked *


Kerry Bayley

Apr 27, 2020

My career as a project manager has given me plenty of time to get familiar with the full Microsoft suite, as well as a host of other tools, all of which I write about online.

1953 Articles Published

More