I'm having some trouble code-signing my uninstaller, following the directions here. (I'm using NSIS 3.04, MUI2, and the Advanced Uninstall Log header.)
The uninstaller signing code on the linked page constructs an "inner" install using "RequestExecutionLevel User", which prevents an undesired UAC prompt during the build process.
But that constructs an uninstaller which does not request Admin privileges, and this uninstaller is then packaged by the outer installer, which does request Admin privileges. The result is an uninstaller with no privileges, which therefore fails to delete files from within "\Program Files". I need my uninstaller to have Admin privileges to be able to delete the files my installer put there.
I can fix this by building the inner installer with "RequestExecutionLevel Admin". This constructs a proper uninstall executable for the outer installer to incorporate, one with Admin requested. But it also requires me to respond to a UAC prompt during the build process, when the outer build invokes the installer made by the inner build.
I'd like a build process that doesn't require me to respond to a UAC prompt each time, yet still works properly. Any ideas?
Signing an uninstaller without a UAC prompt during build?
3 posts
!system 'set __COMPAT_LAYER=RunAsInvoker&"$temp\tempinstaller.exe"' or something like that to prevent elevation prompt.Works perfectly. Thanks!