open in administrative mode
-
I’m not sure if this is something that changed in a recent release but previously if I had 6 tabs open, one of them being window’s host file, when I went to save a change it would ask if I wanted to open in administritative mode and then would close the notepad++ window and open all the same tabs, including the hosts file in the administrative window. It seems that now it opens a separate administrative window tab only for that one file.
Is this a setting I can change somewhere?
Thanks! -
welcome to the notepad++ community @Stéphane-Boisvert
the only work around i know so far is to always start notepad++ in administrator mode:
open your notepad++ install folder (eg. %ProgramFiles%\Notepad++ or %ProgramFiles(x86)%\Notepad++)
right click on your notepad++.exe and select properties
select compatibility and check run as administratorthe cause is that notepad++ stores it’s settings and sessions for every user.
if you change to the administrator account, only the file to be opened will be passed through, but not the sessions of your individual, originating user account located at%AppData%\Notepad++\session.xml
note:
a little downside of always running notepad++ in administrative mode is, that you will not be able to drag and drop a file into the notepad++ window from an explorer window using your standard account, if your account is not literarily administrator, except if you disable the windows uac completely which is not recommended -
@Meta-Chuh said:
downside of always running notepad++ in administrative mode is, that you will not be able to drag and drop a file into the notepad++ window from an explorer window
…unless you resort to the same RunAsAdmin technique for Explorer! :)
BTW, I’ve always found it odd that drag-and-drop doesn’t work (in the scenario described above) but the right-click Edit with Notepad++ will…
-
it is because explorer’s “open with” passes it to the command line instead of the running executable, starting a new user level instance of notepad++.exe with “%1”
if notepad++ is set to mono-instance it will pass it to the first notepad++ task, so it basically “pipes” it from from one notepad++.exe instance to another notepad++.exe instance instead of from explorer to the already running application
-
Thank you both very much!