Community
    • Login

    Need command to restart Notepad ++

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    19 Posts 5 Posters 7.0k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • dinkumoilD Offline
      dinkumoil @andrecool-68
      last edited by

      @andrecool-68

      You can use the Npp environment variable $(NPP_DIRECTORY).

      andrecool-68A 1 Reply Last reply Reply Quote 3
      • andrecool-68A Offline
        andrecool-68 @dinkumoil
        last edited by

        @dinkumoil said:

        @andrecool-68

        You can use the Npp environment variable $(NPP_DIRECTORY).

        This is the most suitable way.

        1 Reply Last reply Reply Quote 1
        • rinku singhR Offline
          rinku singh
          last edited by

          try

          @echo off

          taskkill /f /im notepad++.exe
          “C:\Program Files\Notepad++\notepad++.exe”

          cls

          andrecool-68A 1 Reply Last reply Reply Quote 0
          • andrecool-68A Offline
            andrecool-68 @rinku singh
            last edited by

            @gurikbal-singh said:

            try

            @echo off

            taskkill /f /im notepad++.exe
            “C:\Program Files\Notepad++\notepad++.exe”

            cls

            I tried to get rid of it … and you offer me to return to this?

            Meta ChuhM 2 Replies Last reply Reply Quote 1
            • Meta ChuhM Offline
              Meta Chuh moderator @andrecool-68
              last edited by

              @andrecool-68

              I tried to get rid of it … and you offer me to return to this?

              the translator of @gurikbal-singh is on holiday 😁

              1 Reply Last reply Reply Quote 1
              • Meta ChuhM Offline
                Meta Chuh moderator @andrecool-68
                last edited by Meta Chuh

                @andrecool-68

                by the way:

                And how is such a combination of two code variants … does it violate the laws of criminal law?
                <Command name="Restart" Ctrl="no" Alt="no" Shift="no" Key="0">cmd /c taskkill /f /im notepad++.exe && start notepad++.exe</Command>

                lol, no, everything is legal 😉

                your version is correct, mine was wrong, as it keeps the cmd window open.
                i just have forgotten the start command while typing, sorry 🙏

                1 Reply Last reply Reply Quote 2
                • EkopalypseE Offline
                  Ekopalypse
                  last edited by

                  Just for completeness, there is also the $(NPP_FULL_FILE_PATH) variable.

                  andrecool-68A 1 Reply Last reply Reply Quote 4
                  • andrecool-68A Offline
                    andrecool-68 @Ekopalypse
                    last edited by

                    @Ekopalypse said:

                    Just for completeness, there is also the $(NPP_FULL_FILE_PATH) variable.

                    Please show me an example of your solution code.

                    EkopalypseE 1 Reply Last reply Reply Quote 1
                    • EkopalypseE Offline
                      Ekopalypse @andrecool-68
                      last edited by

                      @andrecool-68

                      I don’t have one, it was in response to your response about using $(NPP_DIRECTORY),
                      which would mean you need to concatenate directory and executable wheres $(NPP_FULL_FILE_PATH) is already the complete path.
                      Did I misunderstood something?

                      andrecool-68A 1 Reply Last reply Reply Quote 2
                      • andrecool-68A Offline
                        andrecool-68 @Ekopalypse
                        last edited by

                        @Ekopalypse I understood))

                        1 Reply Last reply Reply Quote 1

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • First post
                          Last post
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors