Elevated privileges when saving, doesn't work if different user
-
At work on Windows (10, 64bit Ent, 1709) if I’m editing a file in a restricted area, e.g. the hosts file, when I save it needs admin privileges.
Previously I had local admin rights to my machine, I’m a developer after all, but now we are trialling securing things more. That is to say I now have 2 accounts. My original account that no longer has admin rights and an admin version of my account, e.g. foo and admin.foo.
When I need to save a restricted file as in the above instead of a UAC prompt where I just click ok I now have to enter my admin username/password. This then causes an issue; after the privilege elevation Notepad++ is running under a different user account it no longer has the files open that I had before because they’re specific to the original user context it seems. Thus the only way to work around this is to start Notepad++ as admin and then open and edit the file, which kind of defeats the whole purpose of privilege elevation.