How do I start Notepad++ from cmd?












80















I can start the regular Notepad from cmd.



C:Windows>notepad


I can also start it from the run prompt.




  1. Win+R

  2. notepad

  3. Enter


I want to be able to do the same with the Notepad++. I can start it from the run prompt, but I can't start it from cmd.



I can also open a specific file in Notepad from cmd.



C:Windows>notepad d:mytext.txt


I want to be able to do the same with Notepad++.



Is this possible, and what can I do to enable this?










share|improve this question




















  • 1





    In Windows Vista, Windows 7, 8you can you can use start menu search box like run command. No need to press Win+R. Press Win and type in search box. Try it!

    – Kamil
    Aug 26 '14 at 0:25













  • (Not enough rep to answer). If you want to open a file whose extension is associated to NotePad++, just type the full filename: d:mytext.txt and it will be open in the default app. You cannot pass CL arguments, but quick enough if you just want to open the file

    – cbuchart
    Nov 19 '18 at 11:30
















80















I can start the regular Notepad from cmd.



C:Windows>notepad


I can also start it from the run prompt.




  1. Win+R

  2. notepad

  3. Enter


I want to be able to do the same with the Notepad++. I can start it from the run prompt, but I can't start it from cmd.



I can also open a specific file in Notepad from cmd.



C:Windows>notepad d:mytext.txt


I want to be able to do the same with Notepad++.



Is this possible, and what can I do to enable this?










share|improve this question




















  • 1





    In Windows Vista, Windows 7, 8you can you can use start menu search box like run command. No need to press Win+R. Press Win and type in search box. Try it!

    – Kamil
    Aug 26 '14 at 0:25













  • (Not enough rep to answer). If you want to open a file whose extension is associated to NotePad++, just type the full filename: d:mytext.txt and it will be open in the default app. You cannot pass CL arguments, but quick enough if you just want to open the file

    – cbuchart
    Nov 19 '18 at 11:30














80












80








80


31






I can start the regular Notepad from cmd.



C:Windows>notepad


I can also start it from the run prompt.




  1. Win+R

  2. notepad

  3. Enter


I want to be able to do the same with the Notepad++. I can start it from the run prompt, but I can't start it from cmd.



I can also open a specific file in Notepad from cmd.



C:Windows>notepad d:mytext.txt


I want to be able to do the same with Notepad++.



Is this possible, and what can I do to enable this?










share|improve this question
















I can start the regular Notepad from cmd.



C:Windows>notepad


I can also start it from the run prompt.




  1. Win+R

  2. notepad

  3. Enter


I want to be able to do the same with the Notepad++. I can start it from the run prompt, but I can't start it from cmd.



I can also open a specific file in Notepad from cmd.



C:Windows>notepad d:mytext.txt


I want to be able to do the same with Notepad++.



Is this possible, and what can I do to enable this?







command-line windows-vista notepad++






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 19 '17 at 16:06









Steven M. Vascellaro

4,461164997




4,461164997










asked Jun 13 '13 at 21:08









SamirSamir

11.2k56143205




11.2k56143205








  • 1





    In Windows Vista, Windows 7, 8you can you can use start menu search box like run command. No need to press Win+R. Press Win and type in search box. Try it!

    – Kamil
    Aug 26 '14 at 0:25













  • (Not enough rep to answer). If you want to open a file whose extension is associated to NotePad++, just type the full filename: d:mytext.txt and it will be open in the default app. You cannot pass CL arguments, but quick enough if you just want to open the file

    – cbuchart
    Nov 19 '18 at 11:30














  • 1





    In Windows Vista, Windows 7, 8you can you can use start menu search box like run command. No need to press Win+R. Press Win and type in search box. Try it!

    – Kamil
    Aug 26 '14 at 0:25













  • (Not enough rep to answer). If you want to open a file whose extension is associated to NotePad++, just type the full filename: d:mytext.txt and it will be open in the default app. You cannot pass CL arguments, but quick enough if you just want to open the file

    – cbuchart
    Nov 19 '18 at 11:30








1




1





In Windows Vista, Windows 7, 8you can you can use start menu search box like run command. No need to press Win+R. Press Win and type in search box. Try it!

– Kamil
Aug 26 '14 at 0:25







In Windows Vista, Windows 7, 8you can you can use start menu search box like run command. No need to press Win+R. Press Win and type in search box. Try it!

– Kamil
Aug 26 '14 at 0:25















(Not enough rep to answer). If you want to open a file whose extension is associated to NotePad++, just type the full filename: d:mytext.txt and it will be open in the default app. You cannot pass CL arguments, but quick enough if you just want to open the file

– cbuchart
Nov 19 '18 at 11:30





(Not enough rep to answer). If you want to open a file whose extension is associated to NotePad++, just type the full filename: d:mytext.txt and it will be open in the default app. You cannot pass CL arguments, but quick enough if you just want to open the file

– cbuchart
Nov 19 '18 at 11:30










9 Answers
9






active

oldest

votes


















57














You could add C:Program Files (x86)Notepad++ to your PATH environment variable.



For example, you could run the following on the command prompt:



set PATH=%PATH%;C:Program Files (x86)Notepad++


For further options, see What are PATH and other environment variables, and how can I set or use them?






share|improve this answer


























  • Thanks! It works now. Now I can do notepad++ %userprofile%desktoptestfile.txt which is nice. I used the Environment Variables dialog box for this. What's the syntax for removing an environment variable using the set command? I couldn't find any specific switches or syntax for this. Not on the link you provided and not on the Computer Hope website.

    – Samir
    Jun 13 '13 at 21:24






  • 1





    @Sammy: Removing a single directory from the PATH variable is best done through the GUI, I assume. I don't know how to quickly remove it from the command line. If you want to completely remove an environment variable, you can use set something=, but I wouldn't advise you to do that for PATH.

    – Der Hochstapler
    Jun 13 '13 at 21:26













  • I found a path command. I understand I'm supposed to use semi colon to delete a path in the PATH variable?... I'm not sure how.

    – Samir
    Jun 13 '13 at 21:32











  • Using path ; clears the search path settings for the current instance of cmd. It doesn't actually remove the search paths from the PATH variable. By opening a new cmd window the search path settings are restored. Oh well, I guess I will use the GUI then.

    – Samir
    Jun 13 '13 at 21:47






  • 4





    This is worth noting: "Changes made with SET will remain only for the duration of the current CMD session." This can be found here. And it says that Set command is used to display, set, or remove CMD environment variables. So Set command can be used to remove the whole variable, in this example the PATH variable. And again, it will not be permanently removed from Windows. It is only valid for the duration of the CMD session. To permanently set an environment variable from CMD, the Setx command should be used instead. Either that or GUI.

    – Samir
    Jun 13 '13 at 22:09





















108














Even though the Notepad++ directory is not in your path, you can use the command below to run the program from the command prompt:



start notepad++


To open a file in Notepad++, run:



start notepad++ <filename>





share|improve this answer





















  • 9





    Not only this answers the original question, this is a very clever workaround that works immediately without having to setup anything. Worked great for me.

    – Sergio Acosta
    Nov 27 '14 at 17:53








  • 9





    Love it. Adding everything to the PATH is a horrible solution on windows. What isn't clear is where START searches to find possible commands if it isn't the path. Is it looking through the stuff installed in the start menu?

    – user10550
    Dec 16 '14 at 14:36











  • and it works also if you are in a cygwin shell: cygstart notepad++

    – laika
    Feb 17 '16 at 17:03






  • 1





    Awesome! I use this after search some string with findstr /spim /c:"SomeString" *.*.

    – Paul Vargas
    Mar 22 '16 at 21:02











  • @user10550 I'm pretty sure Start references stuff in Libraries C:UsersusernameAppDataRoamingMicrosoftWindows where as the $PATH variable is much different. You can actually specify what Start -> search references. More Detail

    – Kolob Canyon
    Sep 30 '16 at 15:06





















19














I would not want to clutter my PATH just for using a single tool.



One alternative is to use an alternative text editor as 100% replacement for Notepad as explained here with many details. Another description with a dedicated editor launcher tool can be found here. Another Notepad++ launcher on github.



A less invasive alternative is a cmd file like this:



"C:ProgrammeNotepad++notepad++.exe" %*


This file has to reside somewhere along the existing PATH.
I actually put all my tools in one common UTIL directory, which is part of PATH.






share|improve this answer


























  • What do you mean by "cmd file"? And what's with the asterisk and the percent sign? What file has to reside "along" the PATH? (It's not like it's going somewhere.) How do you make use of UTIL? Last time I checked there is no variable called UTIL. Is this something you came up yourself and added manually to the system? Can you explain any of this? And maybe give me some concrete example I can work with and hopefully learn from? Or are you just here to brag about how you know command line? I don't mean to be rude or anything, I'm just saying how it is. We all have different skill levels.

    – Samir
    Jun 14 '13 at 15:33






  • 2





    A cmd file could be the text script file npp.cmd which has the command as single text line inside. If you create a directory c:util and put the script file into it, extend your PATH by c:util, you from then on can call Notepad++ by typing "npp". %* stands for "all commandline arguments".

    – Axel Kemper
    Jun 14 '13 at 17:41








  • 1





    A cmd file is often called a "batch file". In the days of MS-DOS, the extension was always .BAT but these days it is often .cmd. The commands in the file are executed by cmd.exe which is the command-line shell itself.

    – steveha
    Oct 23 '13 at 7:04











  • Please note that in PowerShell the syntax for updating the PATH Environment Variable is a little different stackoverflow.com/a/1333717/47226

    – Aaron Hoffman
    Jun 28 '15 at 16:00






  • 1





    It looks like your link to the article on how to replace Notepad is broken already.

    – RobH
    Feb 2 '18 at 21:38



















6














This is what I have done, in this way you dont have to type notepad++
Create np.bat file with this set of commands



@echo off
start "" "C:Program Files (x86)Notepad++notepad++.exe" %*


place np.bat file in c:Windows



open the command prompt and type np or np myfile.txt and enter.






share|improve this answer
























  • Using start "" to prefix the command here prevents locking up the command prompt if a notepad++.exe is not already running.

    – Jeremy Murray
    Nov 6 '18 at 21:26



















6














Combining the answers from Axel Kemper and adding some extra's, here is what I did to make a permanent command that you can give any name you want.



First of all I created an extra folder. In my case: "C:UsersHanselCmdFiles". In this folder I created a new text file throught the right click menu -> new -> text document. Edit the text document using notepad or notepad++ and type the following code in the .txt file:



@echo off
"C:SoftwareNotepad++notepad++.exe" %*


Then you have to rename the file to your personal command, for example "npp.cmd".




On a side note: the @echo off prevents the command from printing to
the command prompt;



the link between the quotation marks can refer to any executable;



*%** will make sure that anything you type after the
npp command (for example "npp nonsense.txt") will be put after the original command in the quotation marks.




Then you need to edit an "environment variable", in this case the so called PATH (this variable contains the folders where Windows looks for commands and executables). To add the folder to your PATH, push the windows button to enter the start menu and type "edit environment variables for your account". Under "User variables for Hansel", create a new "Path" variable if it does not exist or edit the old "Path" variable if there is one.



If you make a new PATH variable, the variable value should just read: C:UsersHansCmdFiles



If you edit an old PATH variable, the variable value should read: oldstuff;C:UsersHansCmdFiles (mind the semi colon).



Windows now looks for commands in the folder "C:UsersHanselCmdFiles" and you can easily add new commands to this folder!






share|improve this answer





















  • 8





    You don't need @ECHO OFF for a one-line command. The @ suppresses echo for that line alone, so @"C:SoftwareNotepad++notepad++.exe" %* does what you want.

    – Clement Cherlin
    Apr 15 '15 at 17:16



















3














A simple way to run any program installed on Windows from command is:




  1. Find the location of notepad++.exe, create a shortcut under the installation directory.


  2. cut and paste the shortcut to C:/windows/system 32.


  3. Now you can press 'Win + R' and type the name of shortcut. All done.



PS: in my case, I named the shortcut 'notepadpp' (or even 'nppp') so that I don't have to press 'shift + =' twice for '+' symbol



Extremely simple and easy, and it's easy to delete the shortcut. You don't even need to change the path, registry






share|improve this answer































    2














    One way is to make a change to this registry key:



    [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionApp PathsNotepad++.exe]



    You can download a zipped .reg file from Donn Felker that lets you open a file with just an n shortcut.



    I edited the .reg before running it and to make sure the path to Notepad++ is correct (e.g. C:Program Files (x86)) and I also changed the shortcut to n instead of n.



    Then double click to add to your registry.






    share|improve this answer































      2














      To run any program from command line with a short name you can create an alias for it by the command doskey:



      doskey alias="drive:path to programexecutable" $*


      For example, after running command
      doskey notepad++="C:Program Files (x86)Notepad++notepad++.exe" $*

      you can open the text file with notepad++ by notepad++ textfile. Of course, you can use shorter alias something as npp or n++.



      Also you can create alias for some path you often open:



      doskey home=cd C:Usersmyprofile


      But unfortunately you cannot use this alias in path. If you run doskey home=C:Usersmyprofile and then enter in the command line cd home or start homemyfile you receive error message.



      To create your aliases automatically each time when cmd runs you can put its into the batch file like autorun.cmd and set it in the registry entry:



      HKCUSoftwareMicrosoftCommand ProcessorAutoRun


      or



      HKLMSoftwareMicrosoftCommand ProcessorAutoRun




      Links to the articles:
      Console Aliases
      Command ProcessorAutoRun






      share|improve this answer































        1














        Add the program directory to your PATH.






        share|improve this answer






















          protected by Community Apr 3 '18 at 13:07



          Thank you for your interest in this question.
          Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



          Would you like to answer one of these unanswered questions instead?














          9 Answers
          9






          active

          oldest

          votes








          9 Answers
          9






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          57














          You could add C:Program Files (x86)Notepad++ to your PATH environment variable.



          For example, you could run the following on the command prompt:



          set PATH=%PATH%;C:Program Files (x86)Notepad++


          For further options, see What are PATH and other environment variables, and how can I set or use them?






          share|improve this answer


























          • Thanks! It works now. Now I can do notepad++ %userprofile%desktoptestfile.txt which is nice. I used the Environment Variables dialog box for this. What's the syntax for removing an environment variable using the set command? I couldn't find any specific switches or syntax for this. Not on the link you provided and not on the Computer Hope website.

            – Samir
            Jun 13 '13 at 21:24






          • 1





            @Sammy: Removing a single directory from the PATH variable is best done through the GUI, I assume. I don't know how to quickly remove it from the command line. If you want to completely remove an environment variable, you can use set something=, but I wouldn't advise you to do that for PATH.

            – Der Hochstapler
            Jun 13 '13 at 21:26













          • I found a path command. I understand I'm supposed to use semi colon to delete a path in the PATH variable?... I'm not sure how.

            – Samir
            Jun 13 '13 at 21:32











          • Using path ; clears the search path settings for the current instance of cmd. It doesn't actually remove the search paths from the PATH variable. By opening a new cmd window the search path settings are restored. Oh well, I guess I will use the GUI then.

            – Samir
            Jun 13 '13 at 21:47






          • 4





            This is worth noting: "Changes made with SET will remain only for the duration of the current CMD session." This can be found here. And it says that Set command is used to display, set, or remove CMD environment variables. So Set command can be used to remove the whole variable, in this example the PATH variable. And again, it will not be permanently removed from Windows. It is only valid for the duration of the CMD session. To permanently set an environment variable from CMD, the Setx command should be used instead. Either that or GUI.

            – Samir
            Jun 13 '13 at 22:09


















          57














          You could add C:Program Files (x86)Notepad++ to your PATH environment variable.



          For example, you could run the following on the command prompt:



          set PATH=%PATH%;C:Program Files (x86)Notepad++


          For further options, see What are PATH and other environment variables, and how can I set or use them?






          share|improve this answer


























          • Thanks! It works now. Now I can do notepad++ %userprofile%desktoptestfile.txt which is nice. I used the Environment Variables dialog box for this. What's the syntax for removing an environment variable using the set command? I couldn't find any specific switches or syntax for this. Not on the link you provided and not on the Computer Hope website.

            – Samir
            Jun 13 '13 at 21:24






          • 1





            @Sammy: Removing a single directory from the PATH variable is best done through the GUI, I assume. I don't know how to quickly remove it from the command line. If you want to completely remove an environment variable, you can use set something=, but I wouldn't advise you to do that for PATH.

            – Der Hochstapler
            Jun 13 '13 at 21:26













          • I found a path command. I understand I'm supposed to use semi colon to delete a path in the PATH variable?... I'm not sure how.

            – Samir
            Jun 13 '13 at 21:32











          • Using path ; clears the search path settings for the current instance of cmd. It doesn't actually remove the search paths from the PATH variable. By opening a new cmd window the search path settings are restored. Oh well, I guess I will use the GUI then.

            – Samir
            Jun 13 '13 at 21:47






          • 4





            This is worth noting: "Changes made with SET will remain only for the duration of the current CMD session." This can be found here. And it says that Set command is used to display, set, or remove CMD environment variables. So Set command can be used to remove the whole variable, in this example the PATH variable. And again, it will not be permanently removed from Windows. It is only valid for the duration of the CMD session. To permanently set an environment variable from CMD, the Setx command should be used instead. Either that or GUI.

            – Samir
            Jun 13 '13 at 22:09
















          57












          57








          57







          You could add C:Program Files (x86)Notepad++ to your PATH environment variable.



          For example, you could run the following on the command prompt:



          set PATH=%PATH%;C:Program Files (x86)Notepad++


          For further options, see What are PATH and other environment variables, and how can I set or use them?






          share|improve this answer















          You could add C:Program Files (x86)Notepad++ to your PATH environment variable.



          For example, you could run the following on the command prompt:



          set PATH=%PATH%;C:Program Files (x86)Notepad++


          For further options, see What are PATH and other environment variables, and how can I set or use them?







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 20 '17 at 10:17









          Community

          1




          1










          answered Jun 13 '13 at 21:10









          Der HochstaplerDer Hochstapler

          67.9k49230285




          67.9k49230285













          • Thanks! It works now. Now I can do notepad++ %userprofile%desktoptestfile.txt which is nice. I used the Environment Variables dialog box for this. What's the syntax for removing an environment variable using the set command? I couldn't find any specific switches or syntax for this. Not on the link you provided and not on the Computer Hope website.

            – Samir
            Jun 13 '13 at 21:24






          • 1





            @Sammy: Removing a single directory from the PATH variable is best done through the GUI, I assume. I don't know how to quickly remove it from the command line. If you want to completely remove an environment variable, you can use set something=, but I wouldn't advise you to do that for PATH.

            – Der Hochstapler
            Jun 13 '13 at 21:26













          • I found a path command. I understand I'm supposed to use semi colon to delete a path in the PATH variable?... I'm not sure how.

            – Samir
            Jun 13 '13 at 21:32











          • Using path ; clears the search path settings for the current instance of cmd. It doesn't actually remove the search paths from the PATH variable. By opening a new cmd window the search path settings are restored. Oh well, I guess I will use the GUI then.

            – Samir
            Jun 13 '13 at 21:47






          • 4





            This is worth noting: "Changes made with SET will remain only for the duration of the current CMD session." This can be found here. And it says that Set command is used to display, set, or remove CMD environment variables. So Set command can be used to remove the whole variable, in this example the PATH variable. And again, it will not be permanently removed from Windows. It is only valid for the duration of the CMD session. To permanently set an environment variable from CMD, the Setx command should be used instead. Either that or GUI.

            – Samir
            Jun 13 '13 at 22:09





















          • Thanks! It works now. Now I can do notepad++ %userprofile%desktoptestfile.txt which is nice. I used the Environment Variables dialog box for this. What's the syntax for removing an environment variable using the set command? I couldn't find any specific switches or syntax for this. Not on the link you provided and not on the Computer Hope website.

            – Samir
            Jun 13 '13 at 21:24






          • 1





            @Sammy: Removing a single directory from the PATH variable is best done through the GUI, I assume. I don't know how to quickly remove it from the command line. If you want to completely remove an environment variable, you can use set something=, but I wouldn't advise you to do that for PATH.

            – Der Hochstapler
            Jun 13 '13 at 21:26













          • I found a path command. I understand I'm supposed to use semi colon to delete a path in the PATH variable?... I'm not sure how.

            – Samir
            Jun 13 '13 at 21:32











          • Using path ; clears the search path settings for the current instance of cmd. It doesn't actually remove the search paths from the PATH variable. By opening a new cmd window the search path settings are restored. Oh well, I guess I will use the GUI then.

            – Samir
            Jun 13 '13 at 21:47






          • 4





            This is worth noting: "Changes made with SET will remain only for the duration of the current CMD session." This can be found here. And it says that Set command is used to display, set, or remove CMD environment variables. So Set command can be used to remove the whole variable, in this example the PATH variable. And again, it will not be permanently removed from Windows. It is only valid for the duration of the CMD session. To permanently set an environment variable from CMD, the Setx command should be used instead. Either that or GUI.

            – Samir
            Jun 13 '13 at 22:09



















          Thanks! It works now. Now I can do notepad++ %userprofile%desktoptestfile.txt which is nice. I used the Environment Variables dialog box for this. What's the syntax for removing an environment variable using the set command? I couldn't find any specific switches or syntax for this. Not on the link you provided and not on the Computer Hope website.

          – Samir
          Jun 13 '13 at 21:24





          Thanks! It works now. Now I can do notepad++ %userprofile%desktoptestfile.txt which is nice. I used the Environment Variables dialog box for this. What's the syntax for removing an environment variable using the set command? I couldn't find any specific switches or syntax for this. Not on the link you provided and not on the Computer Hope website.

          – Samir
          Jun 13 '13 at 21:24




          1




          1





          @Sammy: Removing a single directory from the PATH variable is best done through the GUI, I assume. I don't know how to quickly remove it from the command line. If you want to completely remove an environment variable, you can use set something=, but I wouldn't advise you to do that for PATH.

          – Der Hochstapler
          Jun 13 '13 at 21:26







          @Sammy: Removing a single directory from the PATH variable is best done through the GUI, I assume. I don't know how to quickly remove it from the command line. If you want to completely remove an environment variable, you can use set something=, but I wouldn't advise you to do that for PATH.

          – Der Hochstapler
          Jun 13 '13 at 21:26















          I found a path command. I understand I'm supposed to use semi colon to delete a path in the PATH variable?... I'm not sure how.

          – Samir
          Jun 13 '13 at 21:32





          I found a path command. I understand I'm supposed to use semi colon to delete a path in the PATH variable?... I'm not sure how.

          – Samir
          Jun 13 '13 at 21:32













          Using path ; clears the search path settings for the current instance of cmd. It doesn't actually remove the search paths from the PATH variable. By opening a new cmd window the search path settings are restored. Oh well, I guess I will use the GUI then.

          – Samir
          Jun 13 '13 at 21:47





          Using path ; clears the search path settings for the current instance of cmd. It doesn't actually remove the search paths from the PATH variable. By opening a new cmd window the search path settings are restored. Oh well, I guess I will use the GUI then.

          – Samir
          Jun 13 '13 at 21:47




          4




          4





          This is worth noting: "Changes made with SET will remain only for the duration of the current CMD session." This can be found here. And it says that Set command is used to display, set, or remove CMD environment variables. So Set command can be used to remove the whole variable, in this example the PATH variable. And again, it will not be permanently removed from Windows. It is only valid for the duration of the CMD session. To permanently set an environment variable from CMD, the Setx command should be used instead. Either that or GUI.

          – Samir
          Jun 13 '13 at 22:09







          This is worth noting: "Changes made with SET will remain only for the duration of the current CMD session." This can be found here. And it says that Set command is used to display, set, or remove CMD environment variables. So Set command can be used to remove the whole variable, in this example the PATH variable. And again, it will not be permanently removed from Windows. It is only valid for the duration of the CMD session. To permanently set an environment variable from CMD, the Setx command should be used instead. Either that or GUI.

          – Samir
          Jun 13 '13 at 22:09















          108














          Even though the Notepad++ directory is not in your path, you can use the command below to run the program from the command prompt:



          start notepad++


          To open a file in Notepad++, run:



          start notepad++ <filename>





          share|improve this answer





















          • 9





            Not only this answers the original question, this is a very clever workaround that works immediately without having to setup anything. Worked great for me.

            – Sergio Acosta
            Nov 27 '14 at 17:53








          • 9





            Love it. Adding everything to the PATH is a horrible solution on windows. What isn't clear is where START searches to find possible commands if it isn't the path. Is it looking through the stuff installed in the start menu?

            – user10550
            Dec 16 '14 at 14:36











          • and it works also if you are in a cygwin shell: cygstart notepad++

            – laika
            Feb 17 '16 at 17:03






          • 1





            Awesome! I use this after search some string with findstr /spim /c:"SomeString" *.*.

            – Paul Vargas
            Mar 22 '16 at 21:02











          • @user10550 I'm pretty sure Start references stuff in Libraries C:UsersusernameAppDataRoamingMicrosoftWindows where as the $PATH variable is much different. You can actually specify what Start -> search references. More Detail

            – Kolob Canyon
            Sep 30 '16 at 15:06


















          108














          Even though the Notepad++ directory is not in your path, you can use the command below to run the program from the command prompt:



          start notepad++


          To open a file in Notepad++, run:



          start notepad++ <filename>





          share|improve this answer





















          • 9





            Not only this answers the original question, this is a very clever workaround that works immediately without having to setup anything. Worked great for me.

            – Sergio Acosta
            Nov 27 '14 at 17:53








          • 9





            Love it. Adding everything to the PATH is a horrible solution on windows. What isn't clear is where START searches to find possible commands if it isn't the path. Is it looking through the stuff installed in the start menu?

            – user10550
            Dec 16 '14 at 14:36











          • and it works also if you are in a cygwin shell: cygstart notepad++

            – laika
            Feb 17 '16 at 17:03






          • 1





            Awesome! I use this after search some string with findstr /spim /c:"SomeString" *.*.

            – Paul Vargas
            Mar 22 '16 at 21:02











          • @user10550 I'm pretty sure Start references stuff in Libraries C:UsersusernameAppDataRoamingMicrosoftWindows where as the $PATH variable is much different. You can actually specify what Start -> search references. More Detail

            – Kolob Canyon
            Sep 30 '16 at 15:06
















          108












          108








          108







          Even though the Notepad++ directory is not in your path, you can use the command below to run the program from the command prompt:



          start notepad++


          To open a file in Notepad++, run:



          start notepad++ <filename>





          share|improve this answer















          Even though the Notepad++ directory is not in your path, you can use the command below to run the program from the command prompt:



          start notepad++


          To open a file in Notepad++, run:



          start notepad++ <filename>






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited May 19 '17 at 13:03









          aschultz

          1361210




          1361210










          answered Oct 6 '14 at 10:40









          sudha jallusudha jallu

          1,081262




          1,081262








          • 9





            Not only this answers the original question, this is a very clever workaround that works immediately without having to setup anything. Worked great for me.

            – Sergio Acosta
            Nov 27 '14 at 17:53








          • 9





            Love it. Adding everything to the PATH is a horrible solution on windows. What isn't clear is where START searches to find possible commands if it isn't the path. Is it looking through the stuff installed in the start menu?

            – user10550
            Dec 16 '14 at 14:36











          • and it works also if you are in a cygwin shell: cygstart notepad++

            – laika
            Feb 17 '16 at 17:03






          • 1





            Awesome! I use this after search some string with findstr /spim /c:"SomeString" *.*.

            – Paul Vargas
            Mar 22 '16 at 21:02











          • @user10550 I'm pretty sure Start references stuff in Libraries C:UsersusernameAppDataRoamingMicrosoftWindows where as the $PATH variable is much different. You can actually specify what Start -> search references. More Detail

            – Kolob Canyon
            Sep 30 '16 at 15:06
















          • 9





            Not only this answers the original question, this is a very clever workaround that works immediately without having to setup anything. Worked great for me.

            – Sergio Acosta
            Nov 27 '14 at 17:53








          • 9





            Love it. Adding everything to the PATH is a horrible solution on windows. What isn't clear is where START searches to find possible commands if it isn't the path. Is it looking through the stuff installed in the start menu?

            – user10550
            Dec 16 '14 at 14:36











          • and it works also if you are in a cygwin shell: cygstart notepad++

            – laika
            Feb 17 '16 at 17:03






          • 1





            Awesome! I use this after search some string with findstr /spim /c:"SomeString" *.*.

            – Paul Vargas
            Mar 22 '16 at 21:02











          • @user10550 I'm pretty sure Start references stuff in Libraries C:UsersusernameAppDataRoamingMicrosoftWindows where as the $PATH variable is much different. You can actually specify what Start -> search references. More Detail

            – Kolob Canyon
            Sep 30 '16 at 15:06










          9




          9





          Not only this answers the original question, this is a very clever workaround that works immediately without having to setup anything. Worked great for me.

          – Sergio Acosta
          Nov 27 '14 at 17:53







          Not only this answers the original question, this is a very clever workaround that works immediately without having to setup anything. Worked great for me.

          – Sergio Acosta
          Nov 27 '14 at 17:53






          9




          9





          Love it. Adding everything to the PATH is a horrible solution on windows. What isn't clear is where START searches to find possible commands if it isn't the path. Is it looking through the stuff installed in the start menu?

          – user10550
          Dec 16 '14 at 14:36





          Love it. Adding everything to the PATH is a horrible solution on windows. What isn't clear is where START searches to find possible commands if it isn't the path. Is it looking through the stuff installed in the start menu?

          – user10550
          Dec 16 '14 at 14:36













          and it works also if you are in a cygwin shell: cygstart notepad++

          – laika
          Feb 17 '16 at 17:03





          and it works also if you are in a cygwin shell: cygstart notepad++

          – laika
          Feb 17 '16 at 17:03




          1




          1





          Awesome! I use this after search some string with findstr /spim /c:"SomeString" *.*.

          – Paul Vargas
          Mar 22 '16 at 21:02





          Awesome! I use this after search some string with findstr /spim /c:"SomeString" *.*.

          – Paul Vargas
          Mar 22 '16 at 21:02













          @user10550 I'm pretty sure Start references stuff in Libraries C:UsersusernameAppDataRoamingMicrosoftWindows where as the $PATH variable is much different. You can actually specify what Start -> search references. More Detail

          – Kolob Canyon
          Sep 30 '16 at 15:06







          @user10550 I'm pretty sure Start references stuff in Libraries C:UsersusernameAppDataRoamingMicrosoftWindows where as the $PATH variable is much different. You can actually specify what Start -> search references. More Detail

          – Kolob Canyon
          Sep 30 '16 at 15:06













          19














          I would not want to clutter my PATH just for using a single tool.



          One alternative is to use an alternative text editor as 100% replacement for Notepad as explained here with many details. Another description with a dedicated editor launcher tool can be found here. Another Notepad++ launcher on github.



          A less invasive alternative is a cmd file like this:



          "C:ProgrammeNotepad++notepad++.exe" %*


          This file has to reside somewhere along the existing PATH.
          I actually put all my tools in one common UTIL directory, which is part of PATH.






          share|improve this answer


























          • What do you mean by "cmd file"? And what's with the asterisk and the percent sign? What file has to reside "along" the PATH? (It's not like it's going somewhere.) How do you make use of UTIL? Last time I checked there is no variable called UTIL. Is this something you came up yourself and added manually to the system? Can you explain any of this? And maybe give me some concrete example I can work with and hopefully learn from? Or are you just here to brag about how you know command line? I don't mean to be rude or anything, I'm just saying how it is. We all have different skill levels.

            – Samir
            Jun 14 '13 at 15:33






          • 2





            A cmd file could be the text script file npp.cmd which has the command as single text line inside. If you create a directory c:util and put the script file into it, extend your PATH by c:util, you from then on can call Notepad++ by typing "npp". %* stands for "all commandline arguments".

            – Axel Kemper
            Jun 14 '13 at 17:41








          • 1





            A cmd file is often called a "batch file". In the days of MS-DOS, the extension was always .BAT but these days it is often .cmd. The commands in the file are executed by cmd.exe which is the command-line shell itself.

            – steveha
            Oct 23 '13 at 7:04











          • Please note that in PowerShell the syntax for updating the PATH Environment Variable is a little different stackoverflow.com/a/1333717/47226

            – Aaron Hoffman
            Jun 28 '15 at 16:00






          • 1





            It looks like your link to the article on how to replace Notepad is broken already.

            – RobH
            Feb 2 '18 at 21:38
















          19














          I would not want to clutter my PATH just for using a single tool.



          One alternative is to use an alternative text editor as 100% replacement for Notepad as explained here with many details. Another description with a dedicated editor launcher tool can be found here. Another Notepad++ launcher on github.



          A less invasive alternative is a cmd file like this:



          "C:ProgrammeNotepad++notepad++.exe" %*


          This file has to reside somewhere along the existing PATH.
          I actually put all my tools in one common UTIL directory, which is part of PATH.






          share|improve this answer


























          • What do you mean by "cmd file"? And what's with the asterisk and the percent sign? What file has to reside "along" the PATH? (It's not like it's going somewhere.) How do you make use of UTIL? Last time I checked there is no variable called UTIL. Is this something you came up yourself and added manually to the system? Can you explain any of this? And maybe give me some concrete example I can work with and hopefully learn from? Or are you just here to brag about how you know command line? I don't mean to be rude or anything, I'm just saying how it is. We all have different skill levels.

            – Samir
            Jun 14 '13 at 15:33






          • 2





            A cmd file could be the text script file npp.cmd which has the command as single text line inside. If you create a directory c:util and put the script file into it, extend your PATH by c:util, you from then on can call Notepad++ by typing "npp". %* stands for "all commandline arguments".

            – Axel Kemper
            Jun 14 '13 at 17:41








          • 1





            A cmd file is often called a "batch file". In the days of MS-DOS, the extension was always .BAT but these days it is often .cmd. The commands in the file are executed by cmd.exe which is the command-line shell itself.

            – steveha
            Oct 23 '13 at 7:04











          • Please note that in PowerShell the syntax for updating the PATH Environment Variable is a little different stackoverflow.com/a/1333717/47226

            – Aaron Hoffman
            Jun 28 '15 at 16:00






          • 1





            It looks like your link to the article on how to replace Notepad is broken already.

            – RobH
            Feb 2 '18 at 21:38














          19












          19








          19







          I would not want to clutter my PATH just for using a single tool.



          One alternative is to use an alternative text editor as 100% replacement for Notepad as explained here with many details. Another description with a dedicated editor launcher tool can be found here. Another Notepad++ launcher on github.



          A less invasive alternative is a cmd file like this:



          "C:ProgrammeNotepad++notepad++.exe" %*


          This file has to reside somewhere along the existing PATH.
          I actually put all my tools in one common UTIL directory, which is part of PATH.






          share|improve this answer















          I would not want to clutter my PATH just for using a single tool.



          One alternative is to use an alternative text editor as 100% replacement for Notepad as explained here with many details. Another description with a dedicated editor launcher tool can be found here. Another Notepad++ launcher on github.



          A less invasive alternative is a cmd file like this:



          "C:ProgrammeNotepad++notepad++.exe" %*


          This file has to reside somewhere along the existing PATH.
          I actually put all my tools in one common UTIL directory, which is part of PATH.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Feb 2 '18 at 22:11

























          answered Jun 14 '13 at 14:46









          Axel KemperAxel Kemper

          2,67711621




          2,67711621













          • What do you mean by "cmd file"? And what's with the asterisk and the percent sign? What file has to reside "along" the PATH? (It's not like it's going somewhere.) How do you make use of UTIL? Last time I checked there is no variable called UTIL. Is this something you came up yourself and added manually to the system? Can you explain any of this? And maybe give me some concrete example I can work with and hopefully learn from? Or are you just here to brag about how you know command line? I don't mean to be rude or anything, I'm just saying how it is. We all have different skill levels.

            – Samir
            Jun 14 '13 at 15:33






          • 2





            A cmd file could be the text script file npp.cmd which has the command as single text line inside. If you create a directory c:util and put the script file into it, extend your PATH by c:util, you from then on can call Notepad++ by typing "npp". %* stands for "all commandline arguments".

            – Axel Kemper
            Jun 14 '13 at 17:41








          • 1





            A cmd file is often called a "batch file". In the days of MS-DOS, the extension was always .BAT but these days it is often .cmd. The commands in the file are executed by cmd.exe which is the command-line shell itself.

            – steveha
            Oct 23 '13 at 7:04











          • Please note that in PowerShell the syntax for updating the PATH Environment Variable is a little different stackoverflow.com/a/1333717/47226

            – Aaron Hoffman
            Jun 28 '15 at 16:00






          • 1





            It looks like your link to the article on how to replace Notepad is broken already.

            – RobH
            Feb 2 '18 at 21:38



















          • What do you mean by "cmd file"? And what's with the asterisk and the percent sign? What file has to reside "along" the PATH? (It's not like it's going somewhere.) How do you make use of UTIL? Last time I checked there is no variable called UTIL. Is this something you came up yourself and added manually to the system? Can you explain any of this? And maybe give me some concrete example I can work with and hopefully learn from? Or are you just here to brag about how you know command line? I don't mean to be rude or anything, I'm just saying how it is. We all have different skill levels.

            – Samir
            Jun 14 '13 at 15:33






          • 2





            A cmd file could be the text script file npp.cmd which has the command as single text line inside. If you create a directory c:util and put the script file into it, extend your PATH by c:util, you from then on can call Notepad++ by typing "npp". %* stands for "all commandline arguments".

            – Axel Kemper
            Jun 14 '13 at 17:41








          • 1





            A cmd file is often called a "batch file". In the days of MS-DOS, the extension was always .BAT but these days it is often .cmd. The commands in the file are executed by cmd.exe which is the command-line shell itself.

            – steveha
            Oct 23 '13 at 7:04











          • Please note that in PowerShell the syntax for updating the PATH Environment Variable is a little different stackoverflow.com/a/1333717/47226

            – Aaron Hoffman
            Jun 28 '15 at 16:00






          • 1





            It looks like your link to the article on how to replace Notepad is broken already.

            – RobH
            Feb 2 '18 at 21:38

















          What do you mean by "cmd file"? And what's with the asterisk and the percent sign? What file has to reside "along" the PATH? (It's not like it's going somewhere.) How do you make use of UTIL? Last time I checked there is no variable called UTIL. Is this something you came up yourself and added manually to the system? Can you explain any of this? And maybe give me some concrete example I can work with and hopefully learn from? Or are you just here to brag about how you know command line? I don't mean to be rude or anything, I'm just saying how it is. We all have different skill levels.

          – Samir
          Jun 14 '13 at 15:33





          What do you mean by "cmd file"? And what's with the asterisk and the percent sign? What file has to reside "along" the PATH? (It's not like it's going somewhere.) How do you make use of UTIL? Last time I checked there is no variable called UTIL. Is this something you came up yourself and added manually to the system? Can you explain any of this? And maybe give me some concrete example I can work with and hopefully learn from? Or are you just here to brag about how you know command line? I don't mean to be rude or anything, I'm just saying how it is. We all have different skill levels.

          – Samir
          Jun 14 '13 at 15:33




          2




          2





          A cmd file could be the text script file npp.cmd which has the command as single text line inside. If you create a directory c:util and put the script file into it, extend your PATH by c:util, you from then on can call Notepad++ by typing "npp". %* stands for "all commandline arguments".

          – Axel Kemper
          Jun 14 '13 at 17:41







          A cmd file could be the text script file npp.cmd which has the command as single text line inside. If you create a directory c:util and put the script file into it, extend your PATH by c:util, you from then on can call Notepad++ by typing "npp". %* stands for "all commandline arguments".

          – Axel Kemper
          Jun 14 '13 at 17:41






          1




          1





          A cmd file is often called a "batch file". In the days of MS-DOS, the extension was always .BAT but these days it is often .cmd. The commands in the file are executed by cmd.exe which is the command-line shell itself.

          – steveha
          Oct 23 '13 at 7:04





          A cmd file is often called a "batch file". In the days of MS-DOS, the extension was always .BAT but these days it is often .cmd. The commands in the file are executed by cmd.exe which is the command-line shell itself.

          – steveha
          Oct 23 '13 at 7:04













          Please note that in PowerShell the syntax for updating the PATH Environment Variable is a little different stackoverflow.com/a/1333717/47226

          – Aaron Hoffman
          Jun 28 '15 at 16:00





          Please note that in PowerShell the syntax for updating the PATH Environment Variable is a little different stackoverflow.com/a/1333717/47226

          – Aaron Hoffman
          Jun 28 '15 at 16:00




          1




          1





          It looks like your link to the article on how to replace Notepad is broken already.

          – RobH
          Feb 2 '18 at 21:38





          It looks like your link to the article on how to replace Notepad is broken already.

          – RobH
          Feb 2 '18 at 21:38











          6














          This is what I have done, in this way you dont have to type notepad++
          Create np.bat file with this set of commands



          @echo off
          start "" "C:Program Files (x86)Notepad++notepad++.exe" %*


          place np.bat file in c:Windows



          open the command prompt and type np or np myfile.txt and enter.






          share|improve this answer
























          • Using start "" to prefix the command here prevents locking up the command prompt if a notepad++.exe is not already running.

            – Jeremy Murray
            Nov 6 '18 at 21:26
















          6














          This is what I have done, in this way you dont have to type notepad++
          Create np.bat file with this set of commands



          @echo off
          start "" "C:Program Files (x86)Notepad++notepad++.exe" %*


          place np.bat file in c:Windows



          open the command prompt and type np or np myfile.txt and enter.






          share|improve this answer
























          • Using start "" to prefix the command here prevents locking up the command prompt if a notepad++.exe is not already running.

            – Jeremy Murray
            Nov 6 '18 at 21:26














          6












          6








          6







          This is what I have done, in this way you dont have to type notepad++
          Create np.bat file with this set of commands



          @echo off
          start "" "C:Program Files (x86)Notepad++notepad++.exe" %*


          place np.bat file in c:Windows



          open the command prompt and type np or np myfile.txt and enter.






          share|improve this answer













          This is what I have done, in this way you dont have to type notepad++
          Create np.bat file with this set of commands



          @echo off
          start "" "C:Program Files (x86)Notepad++notepad++.exe" %*


          place np.bat file in c:Windows



          open the command prompt and type np or np myfile.txt and enter.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 2 '16 at 3:27









          Nayana AdassuriyaNayana Adassuriya

          18826




          18826













          • Using start "" to prefix the command here prevents locking up the command prompt if a notepad++.exe is not already running.

            – Jeremy Murray
            Nov 6 '18 at 21:26



















          • Using start "" to prefix the command here prevents locking up the command prompt if a notepad++.exe is not already running.

            – Jeremy Murray
            Nov 6 '18 at 21:26

















          Using start "" to prefix the command here prevents locking up the command prompt if a notepad++.exe is not already running.

          – Jeremy Murray
          Nov 6 '18 at 21:26





          Using start "" to prefix the command here prevents locking up the command prompt if a notepad++.exe is not already running.

          – Jeremy Murray
          Nov 6 '18 at 21:26











          6














          Combining the answers from Axel Kemper and adding some extra's, here is what I did to make a permanent command that you can give any name you want.



          First of all I created an extra folder. In my case: "C:UsersHanselCmdFiles". In this folder I created a new text file throught the right click menu -> new -> text document. Edit the text document using notepad or notepad++ and type the following code in the .txt file:



          @echo off
          "C:SoftwareNotepad++notepad++.exe" %*


          Then you have to rename the file to your personal command, for example "npp.cmd".




          On a side note: the @echo off prevents the command from printing to
          the command prompt;



          the link between the quotation marks can refer to any executable;



          *%** will make sure that anything you type after the
          npp command (for example "npp nonsense.txt") will be put after the original command in the quotation marks.




          Then you need to edit an "environment variable", in this case the so called PATH (this variable contains the folders where Windows looks for commands and executables). To add the folder to your PATH, push the windows button to enter the start menu and type "edit environment variables for your account". Under "User variables for Hansel", create a new "Path" variable if it does not exist or edit the old "Path" variable if there is one.



          If you make a new PATH variable, the variable value should just read: C:UsersHansCmdFiles



          If you edit an old PATH variable, the variable value should read: oldstuff;C:UsersHansCmdFiles (mind the semi colon).



          Windows now looks for commands in the folder "C:UsersHanselCmdFiles" and you can easily add new commands to this folder!






          share|improve this answer





















          • 8





            You don't need @ECHO OFF for a one-line command. The @ suppresses echo for that line alone, so @"C:SoftwareNotepad++notepad++.exe" %* does what you want.

            – Clement Cherlin
            Apr 15 '15 at 17:16
















          6














          Combining the answers from Axel Kemper and adding some extra's, here is what I did to make a permanent command that you can give any name you want.



          First of all I created an extra folder. In my case: "C:UsersHanselCmdFiles". In this folder I created a new text file throught the right click menu -> new -> text document. Edit the text document using notepad or notepad++ and type the following code in the .txt file:



          @echo off
          "C:SoftwareNotepad++notepad++.exe" %*


          Then you have to rename the file to your personal command, for example "npp.cmd".




          On a side note: the @echo off prevents the command from printing to
          the command prompt;



          the link between the quotation marks can refer to any executable;



          *%** will make sure that anything you type after the
          npp command (for example "npp nonsense.txt") will be put after the original command in the quotation marks.




          Then you need to edit an "environment variable", in this case the so called PATH (this variable contains the folders where Windows looks for commands and executables). To add the folder to your PATH, push the windows button to enter the start menu and type "edit environment variables for your account". Under "User variables for Hansel", create a new "Path" variable if it does not exist or edit the old "Path" variable if there is one.



          If you make a new PATH variable, the variable value should just read: C:UsersHansCmdFiles



          If you edit an old PATH variable, the variable value should read: oldstuff;C:UsersHansCmdFiles (mind the semi colon).



          Windows now looks for commands in the folder "C:UsersHanselCmdFiles" and you can easily add new commands to this folder!






          share|improve this answer





















          • 8





            You don't need @ECHO OFF for a one-line command. The @ suppresses echo for that line alone, so @"C:SoftwareNotepad++notepad++.exe" %* does what you want.

            – Clement Cherlin
            Apr 15 '15 at 17:16














          6












          6








          6







          Combining the answers from Axel Kemper and adding some extra's, here is what I did to make a permanent command that you can give any name you want.



          First of all I created an extra folder. In my case: "C:UsersHanselCmdFiles". In this folder I created a new text file throught the right click menu -> new -> text document. Edit the text document using notepad or notepad++ and type the following code in the .txt file:



          @echo off
          "C:SoftwareNotepad++notepad++.exe" %*


          Then you have to rename the file to your personal command, for example "npp.cmd".




          On a side note: the @echo off prevents the command from printing to
          the command prompt;



          the link between the quotation marks can refer to any executable;



          *%** will make sure that anything you type after the
          npp command (for example "npp nonsense.txt") will be put after the original command in the quotation marks.




          Then you need to edit an "environment variable", in this case the so called PATH (this variable contains the folders where Windows looks for commands and executables). To add the folder to your PATH, push the windows button to enter the start menu and type "edit environment variables for your account". Under "User variables for Hansel", create a new "Path" variable if it does not exist or edit the old "Path" variable if there is one.



          If you make a new PATH variable, the variable value should just read: C:UsersHansCmdFiles



          If you edit an old PATH variable, the variable value should read: oldstuff;C:UsersHansCmdFiles (mind the semi colon).



          Windows now looks for commands in the folder "C:UsersHanselCmdFiles" and you can easily add new commands to this folder!






          share|improve this answer















          Combining the answers from Axel Kemper and adding some extra's, here is what I did to make a permanent command that you can give any name you want.



          First of all I created an extra folder. In my case: "C:UsersHanselCmdFiles". In this folder I created a new text file throught the right click menu -> new -> text document. Edit the text document using notepad or notepad++ and type the following code in the .txt file:



          @echo off
          "C:SoftwareNotepad++notepad++.exe" %*


          Then you have to rename the file to your personal command, for example "npp.cmd".




          On a side note: the @echo off prevents the command from printing to
          the command prompt;



          the link between the quotation marks can refer to any executable;



          *%** will make sure that anything you type after the
          npp command (for example "npp nonsense.txt") will be put after the original command in the quotation marks.




          Then you need to edit an "environment variable", in this case the so called PATH (this variable contains the folders where Windows looks for commands and executables). To add the folder to your PATH, push the windows button to enter the start menu and type "edit environment variables for your account". Under "User variables for Hansel", create a new "Path" variable if it does not exist or edit the old "Path" variable if there is one.



          If you make a new PATH variable, the variable value should just read: C:UsersHansCmdFiles



          If you edit an old PATH variable, the variable value should read: oldstuff;C:UsersHansCmdFiles (mind the semi colon).



          Windows now looks for commands in the folder "C:UsersHanselCmdFiles" and you can easily add new commands to this folder!







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 23 at 14:08









          Thorbjørn Ravn Andersen

          3391317




          3391317










          answered Aug 25 '14 at 22:40









          HanselHansel

          9412




          9412








          • 8





            You don't need @ECHO OFF for a one-line command. The @ suppresses echo for that line alone, so @"C:SoftwareNotepad++notepad++.exe" %* does what you want.

            – Clement Cherlin
            Apr 15 '15 at 17:16














          • 8





            You don't need @ECHO OFF for a one-line command. The @ suppresses echo for that line alone, so @"C:SoftwareNotepad++notepad++.exe" %* does what you want.

            – Clement Cherlin
            Apr 15 '15 at 17:16








          8




          8





          You don't need @ECHO OFF for a one-line command. The @ suppresses echo for that line alone, so @"C:SoftwareNotepad++notepad++.exe" %* does what you want.

          – Clement Cherlin
          Apr 15 '15 at 17:16





          You don't need @ECHO OFF for a one-line command. The @ suppresses echo for that line alone, so @"C:SoftwareNotepad++notepad++.exe" %* does what you want.

          – Clement Cherlin
          Apr 15 '15 at 17:16











          3














          A simple way to run any program installed on Windows from command is:




          1. Find the location of notepad++.exe, create a shortcut under the installation directory.


          2. cut and paste the shortcut to C:/windows/system 32.


          3. Now you can press 'Win + R' and type the name of shortcut. All done.



          PS: in my case, I named the shortcut 'notepadpp' (or even 'nppp') so that I don't have to press 'shift + =' twice for '+' symbol



          Extremely simple and easy, and it's easy to delete the shortcut. You don't even need to change the path, registry






          share|improve this answer




























            3














            A simple way to run any program installed on Windows from command is:




            1. Find the location of notepad++.exe, create a shortcut under the installation directory.


            2. cut and paste the shortcut to C:/windows/system 32.


            3. Now you can press 'Win + R' and type the name of shortcut. All done.



            PS: in my case, I named the shortcut 'notepadpp' (or even 'nppp') so that I don't have to press 'shift + =' twice for '+' symbol



            Extremely simple and easy, and it's easy to delete the shortcut. You don't even need to change the path, registry






            share|improve this answer


























              3












              3








              3







              A simple way to run any program installed on Windows from command is:




              1. Find the location of notepad++.exe, create a shortcut under the installation directory.


              2. cut and paste the shortcut to C:/windows/system 32.


              3. Now you can press 'Win + R' and type the name of shortcut. All done.



              PS: in my case, I named the shortcut 'notepadpp' (or even 'nppp') so that I don't have to press 'shift + =' twice for '+' symbol



              Extremely simple and easy, and it's easy to delete the shortcut. You don't even need to change the path, registry






              share|improve this answer













              A simple way to run any program installed on Windows from command is:




              1. Find the location of notepad++.exe, create a shortcut under the installation directory.


              2. cut and paste the shortcut to C:/windows/system 32.


              3. Now you can press 'Win + R' and type the name of shortcut. All done.



              PS: in my case, I named the shortcut 'notepadpp' (or even 'nppp') so that I don't have to press 'shift + =' twice for '+' symbol



              Extremely simple and easy, and it's easy to delete the shortcut. You don't even need to change the path, registry







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Dec 24 '17 at 7:58









              A kindheart Internet userA kindheart Internet user

              311




              311























                  2














                  One way is to make a change to this registry key:



                  [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionApp PathsNotepad++.exe]



                  You can download a zipped .reg file from Donn Felker that lets you open a file with just an n shortcut.



                  I edited the .reg before running it and to make sure the path to Notepad++ is correct (e.g. C:Program Files (x86)) and I also changed the shortcut to n instead of n.



                  Then double click to add to your registry.






                  share|improve this answer




























                    2














                    One way is to make a change to this registry key:



                    [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionApp PathsNotepad++.exe]



                    You can download a zipped .reg file from Donn Felker that lets you open a file with just an n shortcut.



                    I edited the .reg before running it and to make sure the path to Notepad++ is correct (e.g. C:Program Files (x86)) and I also changed the shortcut to n instead of n.



                    Then double click to add to your registry.






                    share|improve this answer


























                      2












                      2








                      2







                      One way is to make a change to this registry key:



                      [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionApp PathsNotepad++.exe]



                      You can download a zipped .reg file from Donn Felker that lets you open a file with just an n shortcut.



                      I edited the .reg before running it and to make sure the path to Notepad++ is correct (e.g. C:Program Files (x86)) and I also changed the shortcut to n instead of n.



                      Then double click to add to your registry.






                      share|improve this answer













                      One way is to make a change to this registry key:



                      [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionApp PathsNotepad++.exe]



                      You can download a zipped .reg file from Donn Felker that lets you open a file with just an n shortcut.



                      I edited the .reg before running it and to make sure the path to Notepad++ is correct (e.g. C:Program Files (x86)) and I also changed the shortcut to n instead of n.



                      Then double click to add to your registry.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Jan 10 '14 at 8:48









                      HugoHugo

                      2,41011621




                      2,41011621























                          2














                          To run any program from command line with a short name you can create an alias for it by the command doskey:



                          doskey alias="drive:path to programexecutable" $*


                          For example, after running command
                          doskey notepad++="C:Program Files (x86)Notepad++notepad++.exe" $*

                          you can open the text file with notepad++ by notepad++ textfile. Of course, you can use shorter alias something as npp or n++.



                          Also you can create alias for some path you often open:



                          doskey home=cd C:Usersmyprofile


                          But unfortunately you cannot use this alias in path. If you run doskey home=C:Usersmyprofile and then enter in the command line cd home or start homemyfile you receive error message.



                          To create your aliases automatically each time when cmd runs you can put its into the batch file like autorun.cmd and set it in the registry entry:



                          HKCUSoftwareMicrosoftCommand ProcessorAutoRun


                          or



                          HKLMSoftwareMicrosoftCommand ProcessorAutoRun




                          Links to the articles:
                          Console Aliases
                          Command ProcessorAutoRun






                          share|improve this answer




























                            2














                            To run any program from command line with a short name you can create an alias for it by the command doskey:



                            doskey alias="drive:path to programexecutable" $*


                            For example, after running command
                            doskey notepad++="C:Program Files (x86)Notepad++notepad++.exe" $*

                            you can open the text file with notepad++ by notepad++ textfile. Of course, you can use shorter alias something as npp or n++.



                            Also you can create alias for some path you often open:



                            doskey home=cd C:Usersmyprofile


                            But unfortunately you cannot use this alias in path. If you run doskey home=C:Usersmyprofile and then enter in the command line cd home or start homemyfile you receive error message.



                            To create your aliases automatically each time when cmd runs you can put its into the batch file like autorun.cmd and set it in the registry entry:



                            HKCUSoftwareMicrosoftCommand ProcessorAutoRun


                            or



                            HKLMSoftwareMicrosoftCommand ProcessorAutoRun




                            Links to the articles:
                            Console Aliases
                            Command ProcessorAutoRun






                            share|improve this answer


























                              2












                              2








                              2







                              To run any program from command line with a short name you can create an alias for it by the command doskey:



                              doskey alias="drive:path to programexecutable" $*


                              For example, after running command
                              doskey notepad++="C:Program Files (x86)Notepad++notepad++.exe" $*

                              you can open the text file with notepad++ by notepad++ textfile. Of course, you can use shorter alias something as npp or n++.



                              Also you can create alias for some path you often open:



                              doskey home=cd C:Usersmyprofile


                              But unfortunately you cannot use this alias in path. If you run doskey home=C:Usersmyprofile and then enter in the command line cd home or start homemyfile you receive error message.



                              To create your aliases automatically each time when cmd runs you can put its into the batch file like autorun.cmd and set it in the registry entry:



                              HKCUSoftwareMicrosoftCommand ProcessorAutoRun


                              or



                              HKLMSoftwareMicrosoftCommand ProcessorAutoRun




                              Links to the articles:
                              Console Aliases
                              Command ProcessorAutoRun






                              share|improve this answer













                              To run any program from command line with a short name you can create an alias for it by the command doskey:



                              doskey alias="drive:path to programexecutable" $*


                              For example, after running command
                              doskey notepad++="C:Program Files (x86)Notepad++notepad++.exe" $*

                              you can open the text file with notepad++ by notepad++ textfile. Of course, you can use shorter alias something as npp or n++.



                              Also you can create alias for some path you often open:



                              doskey home=cd C:Usersmyprofile


                              But unfortunately you cannot use this alias in path. If you run doskey home=C:Usersmyprofile and then enter in the command line cd home or start homemyfile you receive error message.



                              To create your aliases automatically each time when cmd runs you can put its into the batch file like autorun.cmd and set it in the registry entry:



                              HKCUSoftwareMicrosoftCommand ProcessorAutoRun


                              or



                              HKLMSoftwareMicrosoftCommand ProcessorAutoRun




                              Links to the articles:
                              Console Aliases
                              Command ProcessorAutoRun







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Apr 2 '16 at 4:27









                              Paola CaptanovskaPaola Captanovska

                              413




                              413























                                  1














                                  Add the program directory to your PATH.






                                  share|improve this answer




























                                    1














                                    Add the program directory to your PATH.






                                    share|improve this answer


























                                      1












                                      1








                                      1







                                      Add the program directory to your PATH.






                                      share|improve this answer













                                      Add the program directory to your PATH.







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Jun 13 '13 at 21:11









                                      OesorOesor

                                      2951210




                                      2951210

















                                          protected by Community Apr 3 '18 at 13:07



                                          Thank you for your interest in this question.
                                          Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                                          Would you like to answer one of these unanswered questions instead?



                                          Popular posts from this blog

                                          Mouse cursor on multiple screens with different PPI

                                          Agildo Ribeiro

                                          Sometime when accessing a menu: “Ubuntu 16.04 has experienced an internal error”