{"id":5732,"date":"2017-11-02T15:04:28","date_gmt":"2017-11-02T09:34:28","guid":{"rendered":"http:\/\/198.58.113.91\/blog\/?p=5732"},"modified":"2023-07-29T22:54:45","modified_gmt":"2023-07-29T17:24:45","slug":"replace-notepad-text-editor-notepad-plus-association","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/replace-notepad-text-editor-notepad-plus-association\/","title":{"rendered":"How to Replace Notepad With Notepad++ or Other Editor"},"content":{"rendered":"<p>If you\u2019re looking at how to replace Notepad with Notepad++ or any third-party editor, this post explains how to do it. Notepad++ is a free source code editor and Notepad replacement that supports several languages. Let\u2019s see how you can replace Notepad with Notepad++ without replacing any system files.<!--more--><\/p>\n<p>Notepad is a lightweight program suitable for users who need only very minimal text editing features. For additional features and functionalities, third-party editors like Notepad++ and Sublime Text are awesome, with many features built-in.<\/p>\n<p><em>(This article applies to all versions of Windows, including Windows 10\/11.)<\/em><\/p>\n<div id=\"toc\">\n<p><strong>Contents<\/strong><\/p>\n<ol>\n<li><a href=\"#method_1\">Method 1: Replace Notepad with Notepad++ completely<\/a>\n<ul>\n<li><a href=\"#notepadStyleCmdline\">Option 1: Using Notepad++&#8217;s new command-line<\/a> <strong>(Recommended)<\/strong><\/li>\n<li><a href=\"#notepadreplacer\">Option 2: Using the NotepadReplacer utility<\/a><\/li>\n<li><a href=\"#script\">Option 3: Using a Custom Windows script<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#association\">Method 2: Associate Text Files (.txt) with Notepad++<\/a><\/li>\n<\/ol>\n<\/div>\n<p><em>(Proceed directly to the <a href=\"#notepadStyleCmdline\">RECOMMENDED method<\/a>.)<\/em><\/p>\n<div class=\"qt\">\n<h4>Which of the Methods below should you use?<\/h4>\n<p>If you want Notepad++ to open whenever you double-click a text file, and whenever <code>notepad.exe<\/code> is executed, follow one of the options under <code>Method 1<\/code>. This also means that you can&#8217;t run Notepad as long as the setting is in effect. This method uses the <code>debugger<\/code> registry value to redirect a program to another program. Once you redirect a program using this method, when you launch Notepad by running <code>notepad.exe<\/code> directly or double-click a text file, Notepad++ starts instead of Notepad. This method works in Notepad++ <code>7.5.9<\/code> and higher.<\/p>\n<p>Whereas if you follow <code>Method 2<\/code> (which is a traditional file association modification), you can still launch Notepad as usual; y<em>ou can start Notepad via shortcut, the Run dialog, Open with dialog, etc.<\/em><\/p>\n<\/div>\n<h2>How to Replace Notepad with Notepad++<\/h2>\n<h3><a id=\"method_1\"><\/a>Method 1<\/h3>\n<h4><a id=\"notepadStyleCmdline\"><\/a>Option 1: Using Notepad++&#8217;s new command-line<\/h4>\n<p><em><strong>Note:<\/strong> This is the <strong>RECOMMENDED<\/strong> method. It doesn&#8217;t need a 3rd party program or script.<\/em><\/p>\n<p>Run the following command to replace Notepad with Notepad++.<\/p>\n<ol>\n<li>Start an <a href=\"https:\/\/www.winhelponline.com\/blog\/open-elevated-command-prompt-windows\/\">elevated or admin Command Prompt<\/a>.<\/li>\n<li>Copy the following command, paste it into Command Prompt, and press <code>Enter<\/code>:\n<pre>reg add \"HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\notepad.exe\" \/v \"Debugger\" \/t REG_SZ \/d \"\\\"%ProgramFiles(x86)%\\Notepad++\\notepad++.exe\\\" -notepadStyleCmdline -z\" \/f<\/pre>\n<p>Note that you may need to use &#8220;<code>%ProgramFiles%\\Notepad++\\<\/code>&#8221; to substitute for &#8220;<code>%ProgramFiles(x86)%\\Notepad++\\<\/code>&#8221; if you have Notepad++ 64-bit installed, or use the appropriate path if Notepad++ is installed in a non-default location.<\/p>\n<div class=\"qt\">After running the command, the <code>debugger<\/code> registry value looks like this:<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8478\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/debugger-notepad-plus-switch.png\" alt=\"notepad plus replace debugger notepad.exe\" width=\"743\" height=\"167\" \/><\/p>\n<div class=\"newline\"><em>You can also modify the above registry value using the Registry Editor (<code>regedit.exe<\/code>) if you don&#8217;t prefer the command-line method.<\/em><\/div>\n<div class=\"qt\">\n<h4>Windows 11 &#8211; Additional Steps needed<\/h4>\n<p>Windows 11 comes with the modern\/UWP Notepad Store app, which replaces classic Notepad (using the &#8220;<code>AppExecutionAliasRedirect<\/code>&#8221; registry setting) by default. To replace Notepad with Notepad++ in Windows 11, you&#8217;ll need to <a href=\"https:\/\/www.winhelponline.com\/blog\/restore-old-classic-notepad-windows\/\">restore the classic Notepad,<\/a> or <a href=\"https:\/\/www.winhelponline.com\/blog\/windows-10-store-apps-uninstaller-preinstalled-apps\/\">uninstall the modern Notepad app<\/a> via Settings \u2192 Apps &amp; Features. Also, run the following command-line <strong>if required<\/strong>:<\/p>\n<pre>reg add \"HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\notepad.exe\" \/t REG_DWORD \/v \"UseFilter\" \/d 0 \/f<\/pre>\n<\/div>\n<\/li>\n<li>Close the Command Prompt window.<\/li>\n<\/ol>\n<p>You&#8217;ve now replaced Notepad with Notepad++. Launching text files or running Notepad.exe manually will now start Notepad++.<\/p>\n<p>If you wish to undo (reverse) the changes, use the following command:<\/p>\n<pre>reg delete \"HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\notepad.exe\" \/v \"Debugger\" \/f<\/pre>\n<h4><a id=\"notepadreplacer\"><\/a>Option 2: Use NotepadReplacer program<\/h4>\n<p><a href=\"https:\/\/www.binaryfortress.com\/NotepadReplacer\/\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">NotepadReplacer<\/a> software from <em>Binary Fortress<\/em> lets you replace Notepad the easy way! No registry edits are needed; the program does that automatically.<\/p>\n<p>Download the NotepadReplacer program and run it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5738\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/notepad-replace-1.png\" alt=\"notepadreplacer replace notepad\" width=\"699\" height=\"425\" \/><\/p>\n<p>Choose the Notepad alternative (say, Notepad++) by browsing and selecting the executable, click Next, and click Install.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5737\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/notepad-replace-2.png\" alt=\"notepadreplacer replace notepad\" width=\"699\" height=\"425\" \/><\/p>\n<p>This program sets the debugger for Notepad automatically, redirecting it to &#8220;NotepadReplacer.exe,&#8221; a proxy program that in turn starts Notepad++ and passes the file name arguments to it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5736\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/notepad-replace-3.png\" alt=\"Replace Notepad with Notepad++\" width=\"700\" height=\"184\" \/><\/p>\n<h4><a id=\"script\"><\/a>Option 3: Using a Custom VBScript<\/h4>\n<p>Here is a tiny script that intercepts the file name argument(s) used with Notepad.exe and automatically passes it on to Notepad++. This script can be set as the redirector\/debugger for Notepad.exe via the registry.<\/p>\n<ol>\n<li>Open Notepad, copy the following lines, and paste them:\n<pre>Set WshShell = WScript.CreateObject(\"WScript.Shell\")\r\nIf wscript.arguments.count &lt;2 then\r\n\tWshShell.run \"notepad++.exe\"\r\nElse\r\n\tsCmd = \"notepad++.exe \" &amp; \"\"\"\" &amp; wscript.arguments(1) &amp; \"\"\"\"\r\n\tWshShell.run sCmd\r\nEnd If\r\n<\/pre>\n<\/li>\n<li>Save the file as <code><strong>npp.vbs<\/strong><\/code><\/li>\n<li>Move the file to the <code>C:\\Windows<\/code> directory.<\/li>\n<li>Start the Registry Editor and go to:\n<pre>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options<\/pre>\n<\/li>\n<li>Create a subkey named <strong>notepad.exe<\/strong><\/li>\n<li>Under the <code>notepad.exe<\/code> key, create a string value (REG_SZ) named <code>Debugger<\/code><\/li>\n<li>Double-click <strong>Debugger<\/strong> and set its data as follows:\n<pre>c:\\windows\\system32\\wscript.exe \"c:\\windows\\npp.vbs\"<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5735\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/notepad-replace-4.png\" alt=\"Replace Notepad with Notepad++\" width=\"700\" height=\"184\" \/><\/li>\n<li>Then, go to the following key:\n<pre>HKEY_CLASSES_ROOT\\txtfile\\shell\\open\\command<\/pre>\n<\/li>\n<li>Double-click <code>(default)<\/code> and change the value data from:\n<pre>%SystemRoot%\\system32\\NOTEPAD.EXE %1<\/pre>\n<p>to the following:<\/p>\n<pre>%SystemRoot%\\system32\\NOTEPAD.EXE \"%1\"<\/pre>\n<\/li>\n<li>Exit the Registry Editor.<\/li>\n<\/ol>\n<h4><a id=\"reg\"><\/a>Automate Methods (Options 1 &amp; 3) Using registry files:<\/h4>\n<ul>\n<li>Download <a href=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/replace-notepad.zip\">replace-notepad.zip<\/a>, unzip and run the appropriate registry file. There is also a <code>undo.reg<\/code> file provided if you want to reverse the changes.<\/li>\n<\/ul>\n<hr \/>\n<h3><a id=\"association\"><\/a>Method 2: Associate Text Files (.txt) with Notepad++<\/h3>\n<p>For many users, simply associating the text files with Notepad++ will be enough. This way, Notepad is not blocked or redirected, and you can open it manually at any time.<\/p>\n<ol>\n<li>Create a sample text document on the desktop.<\/li>\n<li>Right-click on the file and click Properties.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5734\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/notepad-replace-5.png\" alt=\"open with change txt files notepad++\" width=\"700\" height=\"275\" \/><\/li>\n<li>Click the Change button, select Notepad++ from the list of apps shown, and click OK.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5733\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/notepad-replace-6.png\" alt=\"notepad++ open with dialog\" width=\"700\" height=\"540\" \/><\/p>\n<div class=\"newline\"><em>If <a href=\"https:\/\/www.winhelponline.com\/blog\/cant-add-program-to-open-with-menu-list-windows\/\">Notepad++ isn&#8217;t listed<\/a> there, click &#8220;More apps&#8221; to show the extended list. Notepad++ may not be listed there if you&#8217;re using the portable edition. If so, click &#8220;Look for another app on this PC&#8221; and manually browse the Notepad++ folder to select the executable. The default Notepad++ executable path is <code>C:\\Program Files (x86)\\Notepad++\\notepad++.exe<\/code><\/em><\/div>\n<div class=\"rp\"><strong>RELATED:<\/strong> <a href=\"https:\/\/www.winhelponline.com\/blog\/open-with-notepad-plus-right-click-menu-windows\/\">How to Add &#8220;Open with Notepad++&#8221; to the Right-click Menu in Windows<\/a><\/div>\n<p>Double-clicking <code>.txt<\/code> files will now open Notepad++.<\/li>\n<\/ol>\n<p><em>Changing the file association is sufficient for most users. However, if you want to completely replace Notepad with Notepad++ such that every call to Notepad will launch Notepad++, follow one of the three options listed under <strong>Method 1<\/strong>.<\/em><\/p>\n<p>You can also adopt some of the methods discussed in this article for any other text editor of your choice.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you\u2019re looking at how to replace Notepad with Notepad++ or any third-party editor, this post explains how to do it. Notepad++ is a free source code editor and Notepad replacement that supports several languages. Let\u2019s see how you can replace Notepad with Notepad++ without replacing any system files.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6,7],"tags":[339,441,480],"class_list":["post-5732","post","type-post","status-publish","format-standard","hentry","category-utilities","category-windows","tag-notepad","tag-registry","tag-scripts"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":26647,"url":"https:\/\/www.winhelponline.com\/blog\/restore-old-classic-notepad-windows\/","url_meta":{"origin":5732,"position":0},"title":"How to Restore Old Classic Notepad in Windows 11","author":"Ramesh","date":"May 7, 2022","format":false,"excerpt":"Windows 11 comes with the modern Notepad app that automatically replaces the old\/classic Notepad program. The new Notepad UWP app supports color emojis, dark mode, RichEdit editing enhancements, Ctrl+} for toggling between matching brackets\/parentheses, multilevel undo, drag & drop, and automatic URL detection. However, many users prefer classic\/win32 apps instead\u2026","rel":"","context":"In &quot;Windows 11&quot;","block_context":{"text":"Windows 11","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-11\/"},"img":{"alt_text":"install notepad using dism in windows 11","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/05\/notepad-install-dism-windows-11.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/05\/notepad-install-dism-windows-11.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/05\/notepad-install-dism-windows-11.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/05\/notepad-install-dism-windows-11.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":23607,"url":"https:\/\/www.winhelponline.com\/blog\/notepad-does-not-open-in-windows-10-reinstall\/","url_meta":{"origin":5732,"position":1},"title":"[Fix] Notepad is missing or does not open in Windows 10","author":"Ramesh","date":"April 14, 2021","format":false,"excerpt":"On a Windows 10 computer, when you attempt to launch Notepad by running Notepad.exe or clicking on the taskbar shortcut, nothing may happen. In some cases, you'll see one of the following errors: Windows cannot find 'notepad.exe'. Make sure you typed the name correctly, and then try again. The item\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"notepad does not open - uninstall and reinstall notepad","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2021\/04\/notepad-missing-shortuct-target.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":213,"url":"https:\/\/www.winhelponline.com\/blog\/add-the-open-with-notepad-context-menu-option-for-all-file-types\/","url_meta":{"origin":5732,"position":2},"title":"Add &#8220;Open with Notepad&#8221; to the Right-click Menu for all file types","author":"Ramesh","date":"April 24, 2008","format":false,"excerpt":"There are situations where you need to open plain-text files having an unknown or unregistered file extension using Notepad. By default, no file association exists for extension-less files and files with unknown extension in Windows. So, to open those files, you use the Open With option and select Notepad from\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"add open with notepad to right-click","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/04\/open_with_notepad.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/04\/open_with_notepad.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/04\/open_with_notepad.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":8738,"url":"https:\/\/www.winhelponline.com\/blog\/open-with-notepad-plus-right-click-menu-windows\/","url_meta":{"origin":5732,"position":3},"title":"Add &#8220;Open with Notepad++&#8221; to the Right-Click Menu","author":"Ramesh","date":"April 19, 2019","format":false,"excerpt":"Many users have replaced Notepad with Notepad++ as the default text editor on their computers. Others use Notepad++ only when needed, and launch it via the Open with menu and choose Notepad++ from the list of options. This post tells you how to add the Open with Notepad++ command to\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"Notepad++ right-click menu in Windows","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/04\/open-with-notepad-plus-registry-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/04\/open-with-notepad-plus-registry-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/04\/open-with-notepad-plus-registry-1.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/04\/open-with-notepad-plus-registry-1.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":1954,"url":"https:\/\/www.winhelponline.com\/blog\/associate-autocad-script-scr-notepad-screen-saver\/","url_meta":{"origin":5732,"position":4},"title":"How to Associate AutoCAD Script (.SCR) Files With Notepad?","author":"Ramesh","date":"March 9, 2016","format":false,"excerpt":"AutoCAD Script files and Windows Screen Savers, both use .SCR file extension. If you're trying to change the .SCR file type association to edit your AutoCAD scripts with Notepad or any other editor, you'll note that the Open With... right-click menu option isn't available for .SCR files. That's because they're\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/w10\/autocad-scr.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":8728,"url":"https:\/\/www.winhelponline.com\/blog\/remove-lines-containing-word-string-text-file\/","url_meta":{"origin":5732,"position":5},"title":"How to Remove Lines Containing a Word or String in a Text File","author":"Ramesh","date":"April 19, 2019","format":false,"excerpt":"If you have hundreds of lines in a text file and want to bulk delete lines that contain a word or string, this article is for you. Let's use the excellent third-party text editor Notepad++ (free) for deleting lines containing a word in a text-based file, using different methods. Remove\u2026","rel":"","context":"In &quot;Utilities&quot;","block_context":{"text":"Utilities","link":"https:\/\/www.winhelponline.com\/blog\/category\/utilities\/"},"img":{"alt_text":"remove lines not containing a word notepad++ regex","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/04\/remove-lines-not-containing-word-regex-notepad-plus.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/04\/remove-lines-not-containing-word-regex-notepad-plus.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/04\/remove-lines-not-containing-word-regex-notepad-plus.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/5732","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/comments?post=5732"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/5732\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=5732"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=5732"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=5732"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}