Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save dialog should correctly elevate privileges (UAC) #9561

Open
mere-human opened this issue Feb 22, 2021 · 3 comments
Open

Save dialog should correctly elevate privileges (UAC) #9561

mere-human opened this issue Feb 22, 2021 · 3 comments
Assignees

Comments

@mere-human
Copy link
Contributor

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:

  1. Create a new file
  2. File > Save as...
  3. Navigate to any directory that requires administrator rights to write (e.g. C:\)
  4. Press Save button

II. Modified file:

  1. File > Open
  2. Select a file that is located in a directory that requires administrator rights to write
  3. Modify a file (add some text)
  4. File > Save

Expected Behavior

UAC dialog appears asking for permission to save:
image

Actual Behavior

I. New file:
image
It suggest you to save in the documents folder without an option to save as administrator.

II. Modified file:
image
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.

@mere-human
Copy link
Contributor Author

I'd also like to work on this one.

@Hsilgos
Copy link

Hsilgos commented Mar 6, 2021

I'd also like to work on this one.

Please don't hesitate to ask me questions if you are going to use Save As Admin plugin as a template.

@dodmi
Copy link

dodmi commented Jan 22, 2022

Is there any progress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants