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

don't ask for administrator privileges on portable installations #35

Open
gfgtdf opened this issue Feb 6, 2017 · 15 comments
Open

don't ask for administrator privileges on portable installations #35

gfgtdf opened this issue Feb 6, 2017 · 15 comments

Comments

@gfgtdf
Copy link

gfgtdf commented Feb 6, 2017

The pluging manger shouldn't ask for administrator privileges unless they are needed. In portable instllation they are usually not needed since the user has full write permissions on the notepad exe files.

@bruderstein
Copy link
Owner

This would be nice. When this was originally implemented, I did attempt something similar, but it's trickier than it seems, as the error for "permission denied" could mean a number of things, not just "you need admin for this". It would be good to attempt all the copies with out though, and only if they fail to try with admin.

I'll leave it as a feature enhancement.

@chcg
Copy link
Collaborator

chcg commented Feb 6, 2017

@gfgtdf
Copy link
Author

gfgtdf commented Feb 7, 2017

Hmm yes but i think its doesnt need to be a perfect solution, for exampel im my case the old files are at <install dir>\plugins\ while the new files are at <install dir>\plugins\Config\plugin_install_temp\plugin1\plugins so some check like parent^4(temp_dir) = parent^1(tagert_dir) might be sufficient.

@chcg
Copy link
Collaborator

chcg commented Feb 20, 2017

Maybe need to be considered:
https://stackoverflow.com/questions/6418791/requesting-administrator-privileges-at-run-time
priviliges could just be reduced during runtime.

@chcg
Copy link
Collaborator

chcg commented Jan 3, 2018

Also for my portable installation I get under settings:

Plugin Config path is:
...\npp.7.5.2.bin.x64\plugins\Config
Plugins in user's AppData directory are disabled - to enable in Notepad++ version 5.9.7 onwards place an empty file called allowAppDataPlugins.xml in the Notepad++ directory.

, and install plugins for all users is checked, but greyed-out so it can't be modified. The ini file unter %APPDATA%\Roaming\Notepad++\plugins\config\PluginManager.ini contains:

InstallLocation=2

@alexhass
Copy link

alexhass commented Jan 6, 2018

This fix is also required to get fixed for "per User" addons. This are typically network drives behind %APPDATA% an UAC has no access to these. UAC is only required for folders that require UAC and ProgramFiles is the only one that requires permissions.

I'm still unsure if the project here is the right place as it has intentionally removed from Notepad++ because of a advertising banner.

@alexhass
Copy link

alexhass commented Jan 6, 2018

NOTE: This is a serious BUG all my many many users cannot workaround and not a feature enhancement!

@RoyiAvital
Copy link

Could it be, at first step to the least, have a simple heuristic like if the drive it is installed is not C:\ then don't require privileges?

Maybe even better if it outside of Program Files / Program Files (x86).

This is really crucial for PortableApps users.

@jakevis
Copy link

jakevis commented Mar 21, 2018

So I was looking at including plugin manager by default on the MS Store fork of NPP that I'm managing... unfortunately this is a blocker for me. If I include this by default, and if a user try's to remove a plugin, gpup will try to elevate (to try and remove the plugin from %appdata%), and windows will block it.

In my scenario.. gpup should fail gracefully if a user tries to remove a plugin from the install directory as well (since it wont have permission to change that).

@almarax
Copy link

almarax commented Aug 29, 2018

The worst thing here is that after trying to update some user gets stuck with error message on every start of npp:


Notepad++ Plugin Manager

There are still some pending actions to complete installing or removing some plugins. Would you like to do these now (Notepad++ will be restarted)?

Yes No

I had to manually track down updater files and clean up them. This is really annoying problem in portable version

@saskra
Copy link

saskra commented Oct 17, 2018

I am also stuck with this error message - how did you get rid of it? And how to prevent it from coming back with the next update?

@sgr0216
Copy link

sgr0216 commented Oct 17, 2018

first,unzip this package called PluginManager_v1.4.12_UNI.zip,then copy the PluginManager.dll and place this file in the Notepad++ plugins directory, and copy the gpup.exe in the updater directory under your Notepad++ program directory.finally, you should restart the Notepad++,then you can find it on your toolbar.
PluginManager_v1.4.12_UNI.zip

@alexhass
Copy link

This does not solve the UAC bug

@sgr0216
Copy link

sgr0216 commented Oct 17, 2018

maybe you should reinstall the Notepad++,I install this program that I uploading the file. you take this file and unzip it,then reinstall. I hope this can help you.
npp.7.5.8.Installer.zip

@alexhass
Copy link

alexhass commented Oct 17, 2018

Honestly, you have not understood the issue reported here.

If plugin manager installs a new plugin it locks up with an UAC prompt. Install fails than and than the user gets tons of issues.

Plugin manager must NOT ask for UAC if the plugin folder is writeable and does not require higher privileges to place files there!

Additionally this issue is not limited to portable. Users with per user plugins are also affected. I have this last issue with non-portable

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

No branches or pull requests

9 participants