-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Description
Description of the Issue
I would like to be prompted with UAC dialog when saving a new file or saving a modified existing file in a protected location that requires administrator rights.
Steps to Reproduce the Issue
I. New file:
- Create a new file
- File > Save as...
- Navigate to any directory that requires administrator rights to write (e.g.
C:\) - Press Save button
II. Modified file:
- File > Open
- Select a file that is located in a directory that requires administrator rights to write
- Modify a file (add some text)
- File > Save
Expected Behavior
UAC dialog appears asking for permission to save:

Actual Behavior
I. New file:

It suggest you to save in the documents folder without an option to save as administrator.
II. Modified file:

It tries to launch a program as administrator.
A side effect of that is all new modifications are lost.
This was mentioned before:
#4873
#8655
Debug Information
Notepad++ v7.9.3 (64-bit)
Build time : Feb 22 2021 - 22:47:45
Path : E:\Development\notepad-plus-plus\PowerEditor\visual.net\x64\Unicode Debug\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 2009
OS Build : 19042.804
Current ANSI codepage : 1252
Plugins : none
Details
There is a plugin that solves this problem NppSaveAsAdmin
However, in version 7.9.3 it stopped working.
In the discussion, it was suggested to incorporate such a functionality into the Notepad++ itself:
Hsilgos/nppsaveasadmin#24 (comment)
Also, UAC is supported starting from Windows Vista.:
https://en.wikipedia.org/wiki/User_Account_Control
Starting from version 7.9.3, Notepad++ isn't supported on the Windows XP.
This makes it possible to implement UAC properly.