vdrake
Posts: 12
Joined: Tue Aug 17, 2021 3:25 am

Offer to re-run installer in Full-UI mode if reduced-UI mode fails

Wed Oct 27, 2021 3:54 pm

Hello,

I have an installer that sets up a service. If the service already exists and has been customized to run as a particular user, then the installer needs that user's password to correctly configure the service.

If the installer is launched with reduced-UI, then no dialogs to collect the password are shown and the installation cannot continue.

In this situation, I would like the installer to re-run the installation in full-UI mode.

So far, I've set up a custom action to give the user the choice of aborting or re-running, then conditionally running a subsequent "Launch a File" custom action.
RetryDialog.png
RetryDialog.png (39.86KiB)Viewed 5691 times
RunInstallerCustomAction.png
RunInstallerCustomAction.png (20.93KiB)Viewed 5691 times
Of course this fails because the installer is already running.
Is there any way I can tell the installer to launch itself again *after* failure?
Or is there some way I can switch to full-UI mode if the installer knows it must collect a password from the user?

I tried sequencing the Launch a File action at "Finish Dialogs Stage" and "Install Execution Stage -> Finish Execution", but neither took place when the installation fails (which I'm doing with a Display Error Message action)

Catalin
Posts: 6537
Joined: Wed Jun 13, 2018 7:49 am

Re: Offer to re-run installer in Full-UI mode if reduced-UI mode fails

Thu Oct 28, 2021 5:04 pm

Hello,

The fact that the custom action does not execute makes sense, since the installation is terminated right when the "ErrorMessage" custom actions executes.

To be fully honest with you, I am not aware of any solution to this scenario (I do not believe it is quite achievable).

The main thing I can think of would be to change the message box custom action to display only the "Ok" button and basically force the user to manually relaunch the setup with full UI.

Another thing would be to let the user know about this beforehand, instructing him how to pass the property containing the password through the command line, e.g.:

Code: Select all

setup.exe /exenoui /qb PASSWORD="some_password"
Hope this helps somehow!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”