Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Start NP++ in elevated mode

    General Discussion
    5
    6
    342
    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 Billow
      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?

      PeterJones 1 Reply Last reply Reply Quote 0
      • PeterJones
        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-Makwana4145
          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 Kilborn 1 Reply Last reply Reply Quote 0
          • Charles Billow
            Charles Billow last edited by

            OK, thanks guys.

            1 Reply Last reply Reply Quote 1
            • Alan Kilborn
              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
              • rddim
                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
                • First post
                  Last post
                Copyright © 2014 NodeBB Forums | Contributors