Add “Open with Notepad” to context menu in Windows 11

Add Open with Notepad to Windows 11 Menu

Windows 11 introduced a redesigned right-click menu that is cleaner, shorter, and more touch-friendly than the one in Windows 10. It is also, for many power users, a little frustrating. Commands that used to be one click away are now tucked behind “Show more options,” and some helpful shortcuts have vanished from the top-level menu entirely. If you regularly peek inside configuration files, log files, scripts, .ini files, or files with no extension at all, you have probably noticed that opening them in Notepad takes more steps than it should.

The usual route is to right-click a file, choose “Open with,” and pick Notepad from the list, or to launch Notepad first and use File > Open to browse to the file. Neither is difficult, but both get tedious when you do them dozens of times a week. A dedicated “Open with Notepad” entry that appears for every file type solves the problem in a single click.

The good news is that Windows still supports custom context menu entries through the registry, and adding one takes only a couple of minutes. In this guide you will learn several ways to do it: editing the registry manually, importing a ready-made .reg file, using Command Prompt or PowerShell, restoring the classic Windows 10-style menu so the entry shows up immediately, and a few alternatives that do not touch the registry at all. You will also learn how to remove the entry if you change your mind.

Before you begin, a quick word of caution. The methods below involve editing the Windows Registry. The changes here are small and low-risk, and they apply only to your user account, but it is still sensible to create a restore point or export the relevant registry branch first. You will need to be comfortable following instructions precisely, and you may need administrator approval for some steps.

How the Windows 11 Context Menu Works

Understanding what you are changing makes the methods easier to follow.

Windows 11 has two context menus. The first is the modern menu, which appears when you right-click a file. It shows a row of icons at the top (cut, copy, rename, share, delete) and a short list of common commands below. The second is the legacy (classic) menu, which you reach by clicking “Show more options” at the bottom of the modern menu or by pressing Shift + F10 with a file selected.

Entries you add through the traditional registry route appear in the legacy menu. That is the key point to remember. Microsoft reserves the modern menu for entries that are registered through newer, package-based mechanisms (shell extensions implementing the IExplorerCommand interface and registered with an app package). A simple registry entry cannot place itself in the modern menu on its own.

This leaves you with two practical options. You can accept that your new “Open with Notepad” entry lives under “Show more options,” which is still faster than navigating the “Open with” dialog, or you can switch Windows 11 back to the classic menu so every entry, including yours, appears right away. Both approaches are covered below.

The registry location that controls this behavior is the shell key under the file-type class. For a command that should apply to all file types, the class is the asterisk (*). A command stored at HKEY_CLASSES_ROOT\*\shell\YourCommand shows up when you right-click any file. Using HKEY_CURRENT_USER\Software\Classes\*\shell instead makes the entry specific to your account and avoids the need for administrator rights, which is what the methods in this guide use.

Method 1: Add “Open with Notepad” Manually Using Registry Editor

This is the most hands-on method, and it teaches you exactly what is being created.

  1. Press Win + R, type regedit, and press Enter. Approve the User Account Control prompt if it appears.
  2. In the address bar at the top of Registry Editor, paste the following path and press Enter:
    HKEY_CURRENT_USER\Software\Classes\*\shell
    If the shell key does not exist under *, right-click the * key, choose New > Key, and name it shell. If the * key itself is missing, create it first under Classes.
  3. Right-click the shell key and choose New > Key. Name the new key OpenWithNotepad. The name is internal, so you can choose any label without spaces.
  4. Select the OpenWithNotepad key. In the right pane, double-click the (Default) value and enter the text you want to see in the menu: Open with Notepad. Click OK.
  5. (Optional but recommended) Add an icon. Right-click an empty area in the right pane, choose New > String Value, name it Icon, and set its data to notepad.exe. Windows will pull the Notepad icon automatically.
  6. Right-click the OpenWithNotepad key and choose New > Key. Name this one command. It must be spelled in lowercase.
  7. Select the command key, double-click its (Default) value, and enter:
    notepad.exe "%1"
    Include the quotation marks around %1. They ensure that file paths containing spaces are passed to Notepad correctly. Click OK.
  8. Close Registry Editor.

Now right-click any file, choose Show more options (or press Shift + F10), and you should see Open with Notepad in the list. Click it, and the file opens in Notepad.

If the entry does not appear immediately, restart Windows Explorer. Open Task Manager with Ctrl + Shift + Esc, find Windows Explorer in the Processes list, right-click it, and choose Restart. Signing out and back in also works.

Show the entry only when holding Shift

If you want the command to stay hidden until you need it, which keeps the menu tidy, add one more value. Inside the OpenWithNotepad key, create a new String Value named Extended and leave its data empty. The entry will then appear only when you hold Shift while right-clicking.

Method 2: Use a Ready-Made .reg File

If you would rather not click through Registry Editor, a .reg file applies the same changes in seconds. It is also handy if you manage several PCs.

  1. Open Notepad.
  2. Paste the following text exactly as shown:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\*\shell\OpenWithNotepad]
@="Open with Notepad"
"Icon"="notepad.exe"

[HKEY_CURRENT_USER\Software\Classes\*\shell\OpenWithNotepad\command]
@="notepad.exe \"%1\""
  1. Click File > Save As. Set Save as type to All files, name the file Add_Open_with_Notepad.reg, and save it somewhere easy to find, such as the Desktop.
  2. Double-click the file, confirm the warning about modifying the registry, and click Yes, then OK.

Note the backslashes before the inner quotation marks in the last line. In .reg syntax, quotation marks inside a value must be escaped, so \" represents a literal quote character.

The undo file

Create a second file named Remove_Open_with_Notepad.reg with this content:

Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Classes\*\shell\OpenWithNotepad]

The minus sign before the key path tells the registry to delete that key. Double-clicking this file removes the menu entry completely. Keep it handy.

Method 3: Use Command Prompt or PowerShell

The built-in reg.exe tool can create the same keys from the command line, which is useful for scripting or remote administration.

  1. Right-click the Start button and choose Terminal (or open Command Prompt or PowerShell from the Start menu). Administrator rights are not required because you are writing to your own user hive.
  2. Run these three commands one after another:
reg add "HKCU\Software\Classes\*\shell\OpenWithNotepad" /ve /d "Open with Notepad" /f

reg add "HKCU\Software\Classes\*\shell\OpenWithNotepad" /v Icon /d "notepad.exe" /f

reg add "HKCU\Software\Classes\*\shell\OpenWithNotepad\command" /ve /d "notepad.exe \"%1\"" /f

The /ve switch sets the default value, /d supplies the data, and /f forces the write without asking for confirmation. In PowerShell, the same commands work because reg.exe is an external program, but avoid trying to use PowerShell’s native New-Item on a path containing a bare asterisk without escaping it with -LiteralPath, since the asterisk is treated as a wildcard.

To remove the entry later, run:

reg delete "HKCU\Software\Classes\*\shell\OpenWithNotepad" /f

Method 4: Restore the Classic Context Menu So the Entry Shows Immediately

Methods 1 to 3 place the command in the legacy menu. If you are tired of clicking “Show more options” every time, you can tell Windows 11 to show the classic menu by default. This does not change your Notepad entry. It simply makes the legacy menu the first thing you see.

Run this command in Command Prompt or Terminal:

reg add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve

Then restart Windows Explorer, either through Task Manager or by running:

taskkill /f /im explorer.exe & start explorer.exe

Right-click any file and you will see the full classic menu, with Open with Notepad listed alongside the other commands.

To go back to the Windows 11 menu, delete that key and restart Explorer:

reg delete "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" /f

This tweak has worked reliably across Windows 11 releases, but Microsoft can change shell behavior in future updates, so treat it as a convenience rather than a guarantee.

Method 5: Alternatives That Do Not Require the Registry

If you prefer not to edit the registry, you have several lighter options.

Use the Send To menu

The Send to submenu is available in the classic context menu and accepts simple shortcuts.

  1. Press Win + R, type shell:sendto, and press Enter.
  2. In the folder that opens, right-click an empty area and choose New > Shortcut.
  3. For the location, type notepad.exe and click Next.
  4. Name the shortcut Notepad and click Finish.

Now you can right-click any file, choose Show more options > Send to > Notepad, and the file opens in Notepad. It is less direct than a top-level entry, but it requires no registry changes and is trivial to remove: just delete the shortcut.

Use Open with and set it as a habit

Right-click the file, choose Open with, and pick Notepad. If Notepad is not listed, choose Choose another app, then select Notepad. You can tick Always use this app to make that file type open in Notepad by default, though be careful with this for types you usually open elsewhere.

Check for the built-in Notepad option

Recent builds of Windows 11 have added an Edit in Notepad entry to the modern context menu for some file types, especially text-based ones. If your system already shows it, you may not need a custom entry. Availability depends on your Windows version and update channel, so check your own right-click menu first.

Use a third-party customization tool

Utilities such as Winaero Tweaker and Nilesoft Shell can add, remove, and reorganize context menu entries through a graphical interface. Some can even place items in the modern-style menu. These tools are convenient, but download them only from the official developer sites and review what they change, since they modify system behavior.

Tips and Troubleshooting

The entry does not appear. Restart Windows Explorer or sign out and back in. Then confirm the key path is exactly HKEY_CURRENT_USER\Software\Classes\*\shell\OpenWithNotepad and that the subkey is named command in lowercase.

The entry appears but nothing happens. Re-check the command value. It should read notepad.exe "%1" with straight quotation marks. Curly quotes copied from a web page or word processor will break the command.

The file opens, but with a wrong path. This usually means the quotes around %1 are missing, which is a common problem with file names that contain spaces.

The entry shows for files but not for folders. That is expected. Notepad opens files, not folders, so this guide targets files only.

Large files freeze Notepad. Notepad is a lightweight editor and can struggle with very large files such as multi-gigabyte logs. For those, a dedicated log viewer or a more capable text editor is a better choice.

You use a different Notepad. If you have installed a replacement such as Notepad++, change the command to that program’s full path, for example "C:\Program Files\Notepad++\notepad++.exe" "%1", and rename the label accordingly.

Safety. Because the entry runs on any file you right-click, it will happily try to open binaries or images as text. Notepad will simply display garbage characters, and nothing is harmed, but avoid saving changes to files that are not plain text.

Conclusion

Adding “Open with Notepad” to the Windows 11 context menu is a small customization that can save a surprising amount of time, especially if you work with configuration files, scripts, logs, and extensionless files regularly. The core idea is simple: create a shell key for all files in the registry, give it a label and icon, and point its command subkey at notepad.exe "%1".

You can apply that idea manually in Registry Editor, automate it with a .reg file, or script it with reg.exe. Because the entry is created in the legacy menu, you will find it under “Show more options” unless you also restore the classic menu with the CLSID tweak. If you would rather leave the registry alone, the Send To shortcut and the Open with dialog are dependable fallbacks.

Whichever route you choose, keep the removal steps close at hand. Changes made to your own user hive are easy to reverse, and an undo .reg file makes the process effortless. With a few minutes of setup, opening any file in Notepad becomes a one-click action.

Frequently Asked Questions

1. Why does “Open with Notepad” appear under “Show more options” instead of the main Windows 11 menu?

The new Windows 11 menu only displays entries registered through modern, package-based shell extensions. Classic registry entries, including the one in this guide, are routed to the legacy menu. You can reach it with Shift + F10 or by choosing “Show more options.” If you want everything in one place, restore the classic menu using the CLSID registry tweak in Method 4.

2. Is it safe to edit the registry to add this entry?

Yes, as long as you follow the steps carefully. The entry is created under HKEY_CURRENT_USER, so it affects only your account and cannot damage system-wide settings. It is still good practice to create a system restore point or export the Classes branch before making changes. If anything goes wrong, the undo .reg file or the reg delete command removes the entry cleanly.

3. Can I make the entry appear only for text files, such as .txt or .log?

Yes. Instead of placing the key under *\shell, create it under the specific file type’s class. For example, locate the ProgID that handles .log files, or use HKEY_CURRENT_USER\Software\Classes\SystemFileAssociations\.log\shell\OpenWithNotepad, and add the same command subkey there. Repeat for each extension you want. Using SystemFileAssociations is convenient because it works regardless of which app currently owns the file type.

4. How do I remove “Open with Notepad” from the context menu?

Delete the OpenWithNotepad key. You can do this in Registry Editor by navigating to HKEY_CURRENT_USER\Software\Classes\*\shell, right-clicking OpenWithNotepad, and choosing Delete. Alternatively, run reg delete "HKCU\Software\Classes\*\shell\OpenWithNotepad" /f in a terminal, or double-click the undo .reg file from Method 2. Restart Windows Explorer afterward if the entry still appears.

GeeksDigit.Com
Logo