How to make notepad++ the default editor for a Windows batch file?












13














In Windows, if you right-click a .bat file, there's an "Edit" option, which opens the .bat file with notepad. How do I make Windows use Notepad++ instead?



Note that this is different from the question How do I set Notepad++ as the default editor?. In that question, user asks for a way to make Notepad++ the default opener for specific file types. This is not what I want here, since I expect that double-clicking on .bat files executes them.










share|improve this question





























    13














    In Windows, if you right-click a .bat file, there's an "Edit" option, which opens the .bat file with notepad. How do I make Windows use Notepad++ instead?



    Note that this is different from the question How do I set Notepad++ as the default editor?. In that question, user asks for a way to make Notepad++ the default opener for specific file types. This is not what I want here, since I expect that double-clicking on .bat files executes them.










    share|improve this question



























      13












      13








      13


      7





      In Windows, if you right-click a .bat file, there's an "Edit" option, which opens the .bat file with notepad. How do I make Windows use Notepad++ instead?



      Note that this is different from the question How do I set Notepad++ as the default editor?. In that question, user asks for a way to make Notepad++ the default opener for specific file types. This is not what I want here, since I expect that double-clicking on .bat files executes them.










      share|improve this question















      In Windows, if you right-click a .bat file, there's an "Edit" option, which opens the .bat file with notepad. How do I make Windows use Notepad++ instead?



      Note that this is different from the question How do I set Notepad++ as the default editor?. In that question, user asks for a way to make Notepad++ the default opener for specific file types. This is not what I want here, since I expect that double-clicking on .bat files executes them.







      windows notepad++






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 20 '17 at 10:17









      Community

      1




      1










      asked Mar 12 '14 at 17:50









      becko

      2923520




      2923520






















          2 Answers
          2






          active

          oldest

          votes


















          21














          Change the program associated to the "Edit" verb for batch files:




          • Run RegEdit.

          • Navigate to HKEY_CLASSES_ROOTbatfileshelleditcommand.

          • Modify the Default and change Value Data from %SystemRoot%System32NOTEPAD.EXE %1 to
            "C:Program Files (x86)Notepad++notepad++.exe" %1


          • Close RegEdit.

          • Right-click -> "Edit" should now open batch files in NotePad++.


          Note: You may have to adjust your path to Notepad++.exe if it resides in a different folder on your system.



          Also note: This is a system-wide change.






          share|improve this answer





















          • @MarkDuncan That's not really an alternative way to assign Notepad++ to the R-Click -> Edit menu entry. ;)
            – Ƭᴇcʜιᴇ007
            Mar 6 '15 at 15:53










          • @Techie007 - No it's a quick and easy way without the need to rewrite any registry entries. I came here looking for the same solution(edit with another program) but then realised drag and drop would be sufficient.
            – Mark Duncan
            Mar 7 '15 at 11:49










          • Used to do this, but it's not working after win8. Is there any way to do this in win8 / win10 ? Btw I'm using notepad2. In win8/win10, it will show "windows can't open this type of file (.cmd / .bat)"
            – Tiw
            Jul 2 '17 at 8:48










          • @POW Just did it in Win 10. Working correctly, no errors.
            – fredsbend
            Oct 27 at 0:44










          • Never mind. Not working for Sublime Text 3. Sublime tries to open the folder and the file, presents it like it's a blank document, and asks you to save when you try to close it.
            – fredsbend
            Oct 27 at 0:49



















          0














          If there are spaces in the filename being edited then "" can be added as :
          "C:Program Files (x86)Notepad++notepad++.exe" "%1"






          share|improve this answer





















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f728152%2fhow-to-make-notepad-the-default-editor-for-a-windows-batch-file%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            21














            Change the program associated to the "Edit" verb for batch files:




            • Run RegEdit.

            • Navigate to HKEY_CLASSES_ROOTbatfileshelleditcommand.

            • Modify the Default and change Value Data from %SystemRoot%System32NOTEPAD.EXE %1 to
              "C:Program Files (x86)Notepad++notepad++.exe" %1


            • Close RegEdit.

            • Right-click -> "Edit" should now open batch files in NotePad++.


            Note: You may have to adjust your path to Notepad++.exe if it resides in a different folder on your system.



            Also note: This is a system-wide change.






            share|improve this answer





















            • @MarkDuncan That's not really an alternative way to assign Notepad++ to the R-Click -> Edit menu entry. ;)
              – Ƭᴇcʜιᴇ007
              Mar 6 '15 at 15:53










            • @Techie007 - No it's a quick and easy way without the need to rewrite any registry entries. I came here looking for the same solution(edit with another program) but then realised drag and drop would be sufficient.
              – Mark Duncan
              Mar 7 '15 at 11:49










            • Used to do this, but it's not working after win8. Is there any way to do this in win8 / win10 ? Btw I'm using notepad2. In win8/win10, it will show "windows can't open this type of file (.cmd / .bat)"
              – Tiw
              Jul 2 '17 at 8:48










            • @POW Just did it in Win 10. Working correctly, no errors.
              – fredsbend
              Oct 27 at 0:44










            • Never mind. Not working for Sublime Text 3. Sublime tries to open the folder and the file, presents it like it's a blank document, and asks you to save when you try to close it.
              – fredsbend
              Oct 27 at 0:49
















            21














            Change the program associated to the "Edit" verb for batch files:




            • Run RegEdit.

            • Navigate to HKEY_CLASSES_ROOTbatfileshelleditcommand.

            • Modify the Default and change Value Data from %SystemRoot%System32NOTEPAD.EXE %1 to
              "C:Program Files (x86)Notepad++notepad++.exe" %1


            • Close RegEdit.

            • Right-click -> "Edit" should now open batch files in NotePad++.


            Note: You may have to adjust your path to Notepad++.exe if it resides in a different folder on your system.



            Also note: This is a system-wide change.






            share|improve this answer





















            • @MarkDuncan That's not really an alternative way to assign Notepad++ to the R-Click -> Edit menu entry. ;)
              – Ƭᴇcʜιᴇ007
              Mar 6 '15 at 15:53










            • @Techie007 - No it's a quick and easy way without the need to rewrite any registry entries. I came here looking for the same solution(edit with another program) but then realised drag and drop would be sufficient.
              – Mark Duncan
              Mar 7 '15 at 11:49










            • Used to do this, but it's not working after win8. Is there any way to do this in win8 / win10 ? Btw I'm using notepad2. In win8/win10, it will show "windows can't open this type of file (.cmd / .bat)"
              – Tiw
              Jul 2 '17 at 8:48










            • @POW Just did it in Win 10. Working correctly, no errors.
              – fredsbend
              Oct 27 at 0:44










            • Never mind. Not working for Sublime Text 3. Sublime tries to open the folder and the file, presents it like it's a blank document, and asks you to save when you try to close it.
              – fredsbend
              Oct 27 at 0:49














            21












            21








            21






            Change the program associated to the "Edit" verb for batch files:




            • Run RegEdit.

            • Navigate to HKEY_CLASSES_ROOTbatfileshelleditcommand.

            • Modify the Default and change Value Data from %SystemRoot%System32NOTEPAD.EXE %1 to
              "C:Program Files (x86)Notepad++notepad++.exe" %1


            • Close RegEdit.

            • Right-click -> "Edit" should now open batch files in NotePad++.


            Note: You may have to adjust your path to Notepad++.exe if it resides in a different folder on your system.



            Also note: This is a system-wide change.






            share|improve this answer












            Change the program associated to the "Edit" verb for batch files:




            • Run RegEdit.

            • Navigate to HKEY_CLASSES_ROOTbatfileshelleditcommand.

            • Modify the Default and change Value Data from %SystemRoot%System32NOTEPAD.EXE %1 to
              "C:Program Files (x86)Notepad++notepad++.exe" %1


            • Close RegEdit.

            • Right-click -> "Edit" should now open batch files in NotePad++.


            Note: You may have to adjust your path to Notepad++.exe if it resides in a different folder on your system.



            Also note: This is a system-wide change.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 12 '14 at 18:04









            Ƭᴇcʜιᴇ007

            98.6k14155212




            98.6k14155212












            • @MarkDuncan That's not really an alternative way to assign Notepad++ to the R-Click -> Edit menu entry. ;)
              – Ƭᴇcʜιᴇ007
              Mar 6 '15 at 15:53










            • @Techie007 - No it's a quick and easy way without the need to rewrite any registry entries. I came here looking for the same solution(edit with another program) but then realised drag and drop would be sufficient.
              – Mark Duncan
              Mar 7 '15 at 11:49










            • Used to do this, but it's not working after win8. Is there any way to do this in win8 / win10 ? Btw I'm using notepad2. In win8/win10, it will show "windows can't open this type of file (.cmd / .bat)"
              – Tiw
              Jul 2 '17 at 8:48










            • @POW Just did it in Win 10. Working correctly, no errors.
              – fredsbend
              Oct 27 at 0:44










            • Never mind. Not working for Sublime Text 3. Sublime tries to open the folder and the file, presents it like it's a blank document, and asks you to save when you try to close it.
              – fredsbend
              Oct 27 at 0:49


















            • @MarkDuncan That's not really an alternative way to assign Notepad++ to the R-Click -> Edit menu entry. ;)
              – Ƭᴇcʜιᴇ007
              Mar 6 '15 at 15:53










            • @Techie007 - No it's a quick and easy way without the need to rewrite any registry entries. I came here looking for the same solution(edit with another program) but then realised drag and drop would be sufficient.
              – Mark Duncan
              Mar 7 '15 at 11:49










            • Used to do this, but it's not working after win8. Is there any way to do this in win8 / win10 ? Btw I'm using notepad2. In win8/win10, it will show "windows can't open this type of file (.cmd / .bat)"
              – Tiw
              Jul 2 '17 at 8:48










            • @POW Just did it in Win 10. Working correctly, no errors.
              – fredsbend
              Oct 27 at 0:44










            • Never mind. Not working for Sublime Text 3. Sublime tries to open the folder and the file, presents it like it's a blank document, and asks you to save when you try to close it.
              – fredsbend
              Oct 27 at 0:49
















            @MarkDuncan That's not really an alternative way to assign Notepad++ to the R-Click -> Edit menu entry. ;)
            – Ƭᴇcʜιᴇ007
            Mar 6 '15 at 15:53




            @MarkDuncan That's not really an alternative way to assign Notepad++ to the R-Click -> Edit menu entry. ;)
            – Ƭᴇcʜιᴇ007
            Mar 6 '15 at 15:53












            @Techie007 - No it's a quick and easy way without the need to rewrite any registry entries. I came here looking for the same solution(edit with another program) but then realised drag and drop would be sufficient.
            – Mark Duncan
            Mar 7 '15 at 11:49




            @Techie007 - No it's a quick and easy way without the need to rewrite any registry entries. I came here looking for the same solution(edit with another program) but then realised drag and drop would be sufficient.
            – Mark Duncan
            Mar 7 '15 at 11:49












            Used to do this, but it's not working after win8. Is there any way to do this in win8 / win10 ? Btw I'm using notepad2. In win8/win10, it will show "windows can't open this type of file (.cmd / .bat)"
            – Tiw
            Jul 2 '17 at 8:48




            Used to do this, but it's not working after win8. Is there any way to do this in win8 / win10 ? Btw I'm using notepad2. In win8/win10, it will show "windows can't open this type of file (.cmd / .bat)"
            – Tiw
            Jul 2 '17 at 8:48












            @POW Just did it in Win 10. Working correctly, no errors.
            – fredsbend
            Oct 27 at 0:44




            @POW Just did it in Win 10. Working correctly, no errors.
            – fredsbend
            Oct 27 at 0:44












            Never mind. Not working for Sublime Text 3. Sublime tries to open the folder and the file, presents it like it's a blank document, and asks you to save when you try to close it.
            – fredsbend
            Oct 27 at 0:49




            Never mind. Not working for Sublime Text 3. Sublime tries to open the folder and the file, presents it like it's a blank document, and asks you to save when you try to close it.
            – fredsbend
            Oct 27 at 0:49













            0














            If there are spaces in the filename being edited then "" can be added as :
            "C:Program Files (x86)Notepad++notepad++.exe" "%1"






            share|improve this answer


























              0














              If there are spaces in the filename being edited then "" can be added as :
              "C:Program Files (x86)Notepad++notepad++.exe" "%1"






              share|improve this answer
























                0












                0








                0






                If there are spaces in the filename being edited then "" can be added as :
                "C:Program Files (x86)Notepad++notepad++.exe" "%1"






                share|improve this answer












                If there are spaces in the filename being edited then "" can be added as :
                "C:Program Files (x86)Notepad++notepad++.exe" "%1"







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 8 at 11:40









                Johned

                1




                1






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f728152%2fhow-to-make-notepad-the-default-editor-for-a-windows-batch-file%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Plaza Victoria

                    In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

                    How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...