How can I open a file with Notepad without permanently associating its extension with Notepad?
I’m a developer; I basically work in a Windows 8 environment with several virtual machines running Linux, Windows, etc.
I want to prevent Windows associating new file extensions. That is, if I want to open a file Read.me (from a Linux environment) I want to be able to open it with Wordpad or Notepad but I do not want Windows to associate the extension .me with Wordpad or Notepad.
How can I
- always have Notepad and/or Wordpad available on the right-click “open with” menu?
- stop Windows from automatically associating the file extension with the selected program.
I need something simple and non-intrusive, with no side effects. And I do not want to use external programs such as Notepad++. I want to use Notepad and/or Wordpad, as I said. Keep it within the Windows 8 operating system.
22 Answers
You can use a registry hack to add an Open with Notepad option in the right-click menu for all files, without affecting file associations. This is similar to what Notepad++ does when it is installed, except you don't need to install anything.
Press Win + R to open the Run dialog.
Type
regeditand press EnterNavigate to
HKEY_CLASSES_ROOT\*\shellRight-click on shell
Choose to create a new key, calling it
Open with Notepador something similarCreate a new key below that one called
commandDouble-click on the (Default) value in the right-hand pane and enter the following:
notepad.exe %1The new option should appear in the context menus straight away without needing a restart
If you wanted to you could repeat the same steps but for Wordpad instead of Notepad.
This is based on this article from How-To Geek which was originally written for Windows Vista but seems to work for Windows 8.
4If you open the file from inside Notepad it won't be associated (File -> Open in the menu bar). Also have a look at the video demonstration on youtube.
2