Community
    • Login

    Start NP++ in elevated mode

    Scheduled Pinned Locked Moved General Discussion
    6 Posts 5 Posters 1.4k Views 1 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.
    • Charles BillowC Offline
      Charles Billow
      last edited by

      I know that I can set a shortcut to open NP++ in Admin mode, but is there a way to do that from the command-line so that it can be used in a keyboard shortcut?

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP Online
        PeterJones @Charles Billow
        last edited by

        @Charles-Billow ,

        The cmd.exe command runas should do what you want.

        1 Reply Last reply Reply Quote 1
        • Prahlad-Makwana4145P Offline
          Prahlad-Makwana4145
          last edited by

          Hello, @Charles-Billow

          Please follow these steps to open notepad++ using command.

          Step 1:- Open Command Prompt.
          Step 2:- Type command to start notepad++.

          C:\Users\Admin> Start Notepad++
          

          Step 3:- If you want to open particular Notepad++ file then type Command.

          C:\Users\Admin> Start Notepad++ [FileName]
          

          I hope above information will be useful for you.
          Thank you.

          Alan KilbornA 1 Reply Last reply Reply Quote 0
          • Charles BillowC Offline
            Charles Billow
            last edited by

            OK, thanks guys.

            1 Reply Last reply Reply Quote 1
            • Alan KilbornA Offline
              Alan Kilborn @Prahlad-Makwana4145
              last edited by

              @Prahlad-Makwana4145

              How do your instructions guarantee an opening of N++ in Administrator mode?

              1 Reply Last reply Reply Quote 1
              • rddimR Offline
                rddim
                last edited by rddim

                I don’t have success with runas but powershell do the job. Place the text below under the <UserDefinedCommands> section in the shortcut.xml. It will start another instance of Npp with Admin mode.

                <Command name="Run Notepad++ in Admin mode" Ctrl="no" Alt="yes" Shift="no" Key="0">powershell.exe -Command "Start-Process '$(NPP_FULL_FILE_PATH)' '-multiInst' -Verb runAs"</Command>
                
                1 Reply Last reply Reply Quote 2

                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