Community
    • Login

    Start NP++ in elevated mode

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

            OK, thanks guys.

            1 Reply Last reply Reply Quote 1
            • Alan KilbornA
              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
                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
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors