Start NP++ in elevated mode
-
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?
-
The cmd.exe command
runas
should do what you want. -
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. -
OK, thanks guys.
-
How do your instructions guarantee an opening of N++ in Administrator mode?
-
I don’t have success with
runas
but powershell do the job. Place the text below under the<UserDefinedCommands>
section in theshortcut.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>