View Single Post
Old 3rd February 2020, 14:32   #1
Junior Member
Join Date: Feb 2020
Posts: 3
Signing an uninstaller without a UAC prompt during build?

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?
TinyNiceWolf is offline   Reply With Quote