nppPluginManager
nppPluginManager copied to clipboard
don't ask for administrator privileges on portable installations
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.
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.
Corresponding community task: https://notepad-plus-plus.org/community/topic/13236/gpup-exe-requires-administrator-privileges
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.
Maybe need to be considered: https://stackoverflow.com/questions/6418791/requesting-administrator-privileges-at-run-time priviliges could just be reduced during runtime.
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
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.
NOTE: This is a serious BUG all my many many users cannot workaround and not a feature enhancement!
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.
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).
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
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?
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
This does not solve the UAC bug
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
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