Skip to content
⌘ NSIS Forum Archive

Different RequestExecutionLevel for installer and uninstaller

8 posts

HSorgYves#

Different RequestExecutionLevel for installer and uninstaller

Is it possible to have RequestExecutionLevel user for the installer but having an uninstaller with RequestExecutionLevel highest? If yes, how?

Thanks,
Yves
Anders#
What you are asking does not really make sense, but to do it, you have to compile the uninstaller externally (by !system etc) and include it in your installer as a .exe
HSorgYves#
My problem is that if I have RequestExecutionLevel highest set, then i cannot build automatically from vista/7 wihtout clicking ok while extracting the uninstaller before building... :-( I need a workaround for that!
Wizou#
why do you need to extract the uninstaller before building?
in order to sign it?
then this means you build your .NSI twice?
then you could use a /D command-line switch so that the first time (when you really only want the uninstaller) the RequestExecutionLevel is different
HSorgYves#
If I launch the installer with RequestExecutionLevel user to extract the uninstaller than the uninstaller will run with that level as well afaik. :-(
Wizou#
use the procedure explained here:

and a /D NSIS command-line
to create the uninstaller separatedly (with RequestExecutionLevel highest), and embed it in your "user" installer
HSorgYves#
When I create the uninstaller with RequestExecutionLevel highest I cannot build automatically as described before. Windows Vista/7 requests confirmation for the UAC change...
Wizou#
create the uninstaller with RequestExecutionLevel highest
THEN
create the installer with RequestExecutionLevel user and embed the previous uninstaller (with File, rather than WriteUninstaller)

like in the procedure http://nsis.sourceforge.net/Signing_an_Uninstaller