Menu

#560 RequestExecutionLevel for uninstaller

2.0 Series
open
nobody
None
5
2021-10-16
2021-09-28
No

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

Discussion

  • Anders

    Anders - 2021-09-28

    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".

     
  • mailnew4ster

    mailnew4ster - 2021-09-28

    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.

     
    • Anders

      Anders - 2021-10-16

      Portable installs don't have uninstallers, they are supposed to be self-contained in a single folder.

       
  • mailnew4ster

    mailnew4ster - 2021-10-15

    I tried to implement RequestUninstallerExecutionLevel, see https://github.com/kichik/nsis/pull/18

    It'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.

     
    • Anders

      Anders - 2021-10-16

      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.

       
      • mailnew4ster

        mailnew4ster - 2021-10-16

        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.

         

Log in to post a comment.

MongoDB Logo MongoDB