roman.gusev
Posts: 1
Joined: Wed Feb 14, 2018 7:30 pm

Disable "Next" button when no prerequisites are selected

I am trying to create suite installation like it is described https://www.advancedinstaller.com/user- ... tions.html
I followed all steps, but still have some questions I would like to resolve. I’ve slightly diverged during suite package creation since I’ve added PrerequisitesDlg instead of custom config dialog.
Now there is a couple of things I would like to add:
1. Disable Next button on this PrerequisitesDlg if no components are selected. Is there any property I can use for it?
2. Skip actual suite package installation, since it is an empty package really. Now it is still looks like that suite package is trying to install itself which could be a bit confusing for a user.

Could you please help me with answering that questions?
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Disable "Next" button when no prerequisites are selected

Hello,
Disable Next button on this PrerequisitesDlg if no components are selected. Is there any property I can use for it?
Unfortunately you could not disable the next button according to the state of the predefined checklist control from PrerequisitesDlg. In order to implement this scenario you need to create a custom selection dialog (point 4. in the Suite Installation article you've mentioned). Then you could create a new "Control condition" for the next button to disable it if a certain condition is true (for example neither of the checkboxes associated with the prerequisites is checked).
Skip actual suite package installation, since it is an empty package really. Now it is still looks like that suite package is trying to install itself which could be a bit confusing for a user.
Actually, from the Windows Installer point of view this is not an empty package, since Feature Based prerequisites are implemented as features in the package.

In order to implement this you would have to use a workaround. You could use "Pre-Install" prerequisites and create a custom action that would fail main package installation when launched, displaying the "FatalError" dialog from "Special Dialogs" section and finishing the main package installation right after the prerequisites are installed. You could edit the text contained by the FatalError dialog in order to make it look like successful finish execution dialog.

This is the complete method:

- go to "Custom Actions" page and create a new "Run PowerShell inline script" custom action with sequence, configured to run before "Searches" in "Wizzard Dialogs" stage. Enter an invalid PoweShell code in order to trigger the failure of the installation when the custom action is launched

- go to "Dialogs" page and edit the "FatalError" dialog, which will be the finish dialog for your Suite Installation.

Best regards,

Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”