• Login
Community
  • Login

Start NP++ in elevated mode

Scheduled Pinned Locked Moved General Discussion
6 Posts 5 Posters 987 Views
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.
  • C
    Charles Billow
    last edited by Dec 24, 2019, 6:34 PM

    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?

    P 1 Reply Last reply Dec 24, 2019, 7:17 PM Reply Quote 0
    • P
      PeterJones @Charles Billow
      last edited by Dec 24, 2019, 7:17 PM

      @Charles-Billow ,

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

      1 Reply Last reply Reply Quote 1
      • P
        Prahlad-Makwana4145
        last edited by Dec 25, 2019, 5:00 AM

        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.

        A 1 Reply Last reply Dec 27, 2019, 6:38 PM Reply Quote 0
        • C
          Charles Billow
          last edited by Dec 27, 2019, 6:06 PM

          OK, thanks guys.

          1 Reply Last reply Reply Quote 1
          • A
            Alan Kilborn @Prahlad-Makwana4145
            last edited by Dec 27, 2019, 6:38 PM

            @Prahlad-Makwana4145

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

            1 Reply Last reply Reply Quote 1
            • R
              rddim
              last edited by rddim Jan 3, 2020, 1:50 PM Jan 3, 2020, 1:49 PM

              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
              6 out of 6
              • First post
                6/6
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors