The recent !uninstfinalize directive is very nice, thanks for that.
I'd like to also have control over the uninstaller's RequestExecutionLevel.
Specifically, I'd like to have the installer run as user (and elevate explicitly only if needed), but have the uninstaller run as admin with the manifest.
Can we add something like RequestUninstallerExecutionLevel?
It looks like I'm not the only one who needs it:
https://www.google.com/search?q=RequestExecutionLevel+uninstaller
I don't know if that makes sense. The uninstaller should not request elevation if the installer was not elevated.
If you support both per-user and machine installs you might want to use "highest".
I allow to choose between portable and system install. Portable is merely an extraction, system install places an uninstaller which requires admin rights. Now I do it with the old "Signing an Uninstaller", and it's a hack that can have a much more elegant solution.
Portable installs don't have uninstallers, they are supposed to be self-contained in a single folder.
They end up being in a single folder (without an uninstaller). For example, that's what PortableApps do:
https://img.creativemark.co.uk/uploads/images/232/14232/img3File.png
And as another example (closer to what I do), foobar2000 allows to choose between a regular installation and an extraction of a portable version:
https://sportsclinictampico.com/wp-content/uploads/2021/01/foobar2000-fully-customizable-2F121.png
I tried to implement
RequestUninstallerExecutionLevel, see https://github.com/kichik/nsis/pull/18It's a small change, but helps me get rid of a large hack. Please accept this change to help me avoid maintaining a fork, and to help others who need this small feature.
If you provide a working patch we will of course consider it. If it was just adding 5 lines of code we would have done it already.
I looked at it a bit. Unfortunately I'm not familiar with the NSIS code at all, but from what I understand, the uninstaller is being generated by copying and the installer exe and patching it? I didn't see where the icon is replaced, etc., but I thought that the installer and the uninstaller are not that coupled.