Still no proper solution for the administor mode in NPP?



  • It is a real headache!

    I am using folder protections and another stuff that requires me to run NPP as an administrator and yet the software is completely unable to work properly unless I uncheck the option in the “compatibility” settings.

    But maybe there is a proper solution already or it is about to come soon with a new version?



  • @Max-South

    it would be interesting, if you could provide us with some detailed examples that are easy to reproduce, as i have not tested npp on protected folders yet.

    two of the the basic restrictions of running in administrator mode are:

    • you can’t drag and drop files from a user account to the npp window
    • network drives are only accessible if the administrator account has them mapped equally to the users account mapped drives


  • I am using task scheduler to autoelevate NPP and keep the application settings as non-administrator, but there is clearly something wrong with the application’s design if needs those perculiar tricks.



  • @Meta-Chuh There is also another restriction: you get the error I linked if you have set NPP to run in administrator mode. Can this be fixed?

    As to the necessity to use elevated privileges: I use NppExec to run commands, applications, utilities, some of which require it.



  • @Max-South

    thanks for your response

    There is also another restriction: you get the error I linked if you have set NPP to run in administrator mode. Can this be fixed?

    i don’t know if it can be fixed from within the notepad++ code, as it is a windows internal, partial isolation between both user account with administrator rights and elevated administrator policies, but i do have a workaround that worked on all scenarios (at least so far):

    1. your logged in user account has to have administrator privileges.
    2. you must disable uac for this user
      (once uac is disabled, the whole environment and permissions of the logged in user account is used, even for elevated tasks)

    to disable uac in windows 10:
    hit the windows icon and type uac in the search field as seen at the screenshot below:

    alt

    then open up Change User Account Control settings and slide the slider down to the bottom as seen at the screenshot:

    alt

    then hit ok and reboot your machine.
    after reboot, please open up notepad++ and try everything that has not worked before.

    (on windows 7 the uac slider is found by pressing the button “Change User Account Control settings” in your normal user accounts control panel)

    note: notepad++ will now always run in [Administrator] mode, regardless of the compatibility settings you’ve set to notepad++.exe, but with the difference that all elevated tasks will run using and sharing the current user’s environment.
    even drag and drop as well as user level mapped network drives will work.

    As to the necessity to use elevated privileges: I use NppExec to run commands, applications, utilities, some of which require it.

    this should also be solved by disabling uac together with using an account with local administrator rights.

    hope this is of help to you.
    please don’t hesitate to share your testing experience.



  • Thanks for the reply.

    There is also another solution

    But this certainly possible to fix within NPP original code since this is the only application I ever use(d) to generate such errors. Never seen that either before or after I stumbled upon in this case, even though I used countless applications in different privilege statuses over decades.

    Please do not get me wrong: NPP is a truly amazing lightweight productivity marvel versus heavy, fat, slow and glitchy environments. But this excellence makes the quirks like those were discuss here even more frustrating. Let’s hope NPP will be able to get rid of the error without users manually redoing SendTo/OpenWith context menu commands or switching off UAC and so on. :)



  • @Max-South

    thanks for the link, but this only solves issues for the “open with notepad++” explorer context menu.
    unfortunately it would not fix other issues, like the drag and drop isolation, inaccessibility of user level mapped network drives and so on.

    note: this is a solely windows internally based limitation of uac as intended by design, and even explorer itself could not handle it.
    (explorer example: try to open any installer .exe or any other program that needs elevated rights from a network drive. it will fail if it needs to access resources within this .exe or other files on that network drive)

    any application that wants to circumvent this isolation, must use a daemon process which “talks” to the user level application via event and command queues (example: teamviewer system service) so a hell lot of work to do, and in my opinion (as a non notepad++ developer) near impossible to do it with an editor that uses external plugins (each would have to have it’s own daemon if needed).

    Please do not get me wrong: NPP is a truly amazing lightweight productivity marvel versus heavy, fat, slow and glitchy environments. But this excellence makes the quirks like those were discuss here even more frustrating. Let’s hope NPP will be able to get rid of the error without users manually redoing SendTo/OpenWith context menu commands or switching off UAC and so on. :)

    of course, you are correct. these are only workarounds, that might not suit every needs.
    and there’s nothing to get wrong here, you can always speak freely the way you do. this place is filled with devs, it pros and power users, and many if not almost all agree to what you’ve said.

    and here comes my “i hope you didn’t get me wrong ;-)”:
    the explanations and detailed guide on how to disable uac wasn’t for you, as it would have sufficed to tell you “disable uac” in a one line answer.
    none of us would have given you this extensive guide, if it would just be for you, after reading that you elevate npp via schtasks.
    it’s mainly for regular users that have a similar problem, found your thread, and don’t know how to handle uac or what it means … it also saves some time on repeated questions if there’s a step by step solution that can be linked to, from every supporting community member.


Log in to reply