Replace Notepad on Windows 11
-
@Neil-Schipper Thanks for your suggestion. Ultimately figured out a way to add “Open with Notepad++” to the right click menu in Windows 11. Takes care of my needs. Boy, Windows 11 is surely tough to customize to the ways one worked in Windows 10!
-
@PeterJones Thanks. Worked in Windows 11 too! Windows 11 has certainly made it harder to be customized to the look and feel of Windows 10!
-
A little late to the party but if you’re using a portable version, you can add it to the “Send To” list on a context menu by opening File Explorer, putting “shell:sendto” in the address bar, and in that directory add a new shortcut to your portable Notepad++.exe. Hopefully SendTo isn’t borked in Windows 11 too.
-
Here is a possible solution for those who want to replace Notepad.exe with NotePad++.
The previous hack still works if you set the redirection registry settings underneath it. The following batch file code shows a solution.
@ECHO OFF & CLS & ECHO. NET FILE 1>NUL 2>NUL & IF ERRORLEVEL 1 (ECHO You must right-click and select & ECHO "RUN AS ADMINISTRATOR" to run this batch. Exiting... & ECHO. & Timeout /t 10 & EXIT /B) REM ... proceed here with admin rights ... REM http://stackoverflow.com/questions/7044985/how-can-i-auto-elevate-my-batch-file-so-that-it-requests-from-uac-administrator SETLOCAL :: reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "\"%ProgramFiles%\Notepad++\notepad++.exe\" -notepadStyleCmdline -z" /f reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\0" /v "FilterFullPath" /t REG_SZ /d "%ProgramFiles%\Notepad++\notepad++.exe" /f reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\1" /v "FilterFullPath" /t REG_SZ /d "%ProgramFiles%\Notepad++\notepad++.exe" /f reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\2" /v "FilterFullPath" /t REG_SZ /d "%ProgramFiles%\Notepad++\notepad++.exe" /f ::Use the the following comment to undo the replacement: :: reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /f ENDLOCAL GOTO :EOF Technical Notes Replace Notepad on Windows 11 The following code Reverses the change ```@ECHO OFF & CLS & ECHO. NET FILE 1>NUL 2>NUL & IF ERRORLEVEL 1 (ECHO You must right-click and select & ECHO "RUN AS ADMINISTRATOR" to run this batch. Exiting... & ECHO. & Timeout /t 10 & EXIT /B) REM ... proceed here with admin rights ... REM http://stackoverflow.com/questions/7044985/how-can-i-auto-elevate-my-batch-file-so-that-it-requests-from-uac-administrator SETLOCAL ::Use the the following to Reset the default for Windows 11 notepad.exe to undo the replacement by Notepad++ reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /f reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\0" /v "FilterFullPath" /t REG_SZ /d "%ProgramFiles%\Notepad++\notepad.exe" /f reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\1" /v "FilterFullPath" /t REG_SZ /d "%ProgramFiles%\Notepad++\notepad.exe" /f reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\2" /v "FilterFullPath" /t REG_SZ /d "%ProgramFiles%\Notepad++\notepad.exe" /f ENDLOCAL GOTO :EOF Technical Notes Replace Notepad This has only been lightly tested but works for .cmd files and .txt files and perhaps others. Let us know if there are issues. -
@jadelise Thanx… works great.
-
@ChaosDMNS Yup, it works! I’ve just tried it on Win11 22H2. Thanks, @jadelise ! 🙏🏻
-
Are you sure the batch file you provided still works in Windows 11?
I’ve tried it but it doesn’t work (*.txt are double clicked, but always notepad.exe is launched) on my Windows 11 Home Edition version 21H2.
ps. I didn’t uninstall notepad.exeEdit: Obviously, Notepad UWP has to be removed to make it work: (https://www.winhelponline.com/blog/replace-notepad-text-editor-notepad-plus-association/)
I used powershell (admin) commandGet-AppxPackage *Microsoft.WindowsNotepad* | Remove-AppxPackageto remove Notepad. -
i was facing same issue but now it helps me alot… thanks
-
Amazing, that was the tweak i needed,
Running PS 7.5 within Win Terminal, i’m bound to wins terminal business related, but a big downside is not being able to switch out the core text editor, MS pushing their own products i get it. upside is now i don’t have to keystroke 2 times a ++ when editing is needed hehe,
so big big thanks and head off to you sir 🫡
-
FTW! - Many thanks for providing the solution (the nice simple hack the user asked for) - tested on 24H2.
Now I can (finally, after years!) right click on and edit .cmd files. What a relief not to be nagged to install an new version of notepad (even though I have explicitly removed the UWP instance of notepad from the user’s profile. (next – looking for a way to do that globally for the machine. I thought I did so quite a while ago with win10 and “mail and calendar”, but I could very well be mistaken.)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login