M HYPE SPLASH
// news

How can I open a file with Notepad without permanently associating its extension with Notepad?

By John Peck

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

  1. always have Notepad and/or Wordpad available on the right-click “open with” menu?
  2. 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.

2

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

  1. Press Win + R to open the Run dialog.

  2. Type regedit and press Enter

  3. Navigate to HKEY_CLASSES_ROOT\*\shell

  4. Right-click on shell

  5. Choose to create a new key, calling it Open with Notepad or something similar

  6. Create a new key below that one called command

  7. Double-click on the (Default) value in the right-hand pane and enter the following:

    notepad.exe %1

  8. The 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.

4

If 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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy