Can I make ExitDialog have a checkbox for Custom Actions? - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

philh
Posts: 5
Joined: Sun Jan 18, 2009 10:09 pm

Can I make ExitDialog have a checkbox for Custom Actions?

We are using the Professional edition.

We want to ask the user if they want to clean up completely at the end of the uninstall, or just remove the files, etc, put there by the install.

It would be good to be able to display something like the ExitDialog with a checkbox that enabled Custom Actions to be run to remove folders, files, registry entries, etc.

Is this possible or what would be the best way to do this?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Can I make ExitDialog have a checkbox for Custom Actions?

Hi,

Currently this is not supported by Advanced Installer. However, we have this improvement on our TODO list and it will be available in a future version. Until then, a workaround would be to use a custom action. Please note that the User Guide contains the Remove a file or a folder during installation how-to which may help you.

If you want this custom action to be conditioned by a checkbox, you can use the dialog editor in the "Dialogs" page. Basically, you can create a custom checkbox on "ExitDialog" and use a DoAction control event to launch the custom action based on the checkbox state. Please note that the dialog editor can be used only in an Enterprise project.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
philh
Posts: 5
Joined: Sun Jan 18, 2009 10:09 pm

Re: Can I make ExitDialog have a checkbox for Custom Actions?

I'm having problems using your dialog editor under Enterprise edition.

1) If I add a checkbox to ExitDlg, it appears on the ExitDlg for Install, Maintenance, Patch, Resume modes. How do I make it appear only on Maintenance mode and not on the other run types?

2) If I wish to replace ExitDlg for Install/Maint with my own different dialogs, I am unable to delete ExitDlg. How can I do this?

3) If I want to call a custom action based on the checkbox result, I create the checkbox on the dialog, but then if I try to create a DoAction control event the Argument field dropdown box is empty and the OK button is greyed out so it cannot be saved. I have created a Custom Action to execute some VB script based on a property being set, so I need to set that property when the checkbox is checked. Is that the correct way to associate a Custom Action with a dialog property?

4) I would like to add a checkbox to the Repair and Remove dialogs accessed from MaintenanceTypeDlg. According to MaintenanceTypeDlg Published Events these are called VerifyRepairDlg and VerifyRemoveDlg, however I can't find them in the Dialogs list to edit them. Is it possible to edit these dialogs?

5) If I add a checkbox to MaintenanceTypeDlg when I run the install I am unable to check/uncheck it. Is this intentional?


This is what I am trying to display in the Maintenance mode sequence:

PrepareDlg
MaintenanceWelcomeDlg
MaintenanceTypeDlg
ProgressDlg
CleanUserDataDlg (my custom dialog displaying checkbox to call a Custom Action)
ExitDialog

Or:

PrepareDlg
MaintenanceWelcomeDlg
MaintenanceTypeDlg
ProgressDlg
ExitDialog (displaying checkbox to call a Custom Action, only visible in Maintenance mode)

Or:

PrepareDlg
MaintenanceWelcomeDlg
MaintenanceTypeDlg (displaying checkbox to call a Custom Action)
ProgressDlg
ExitDialog


Please tell me if any of these are possible orthe best way to achieve what I am trying to do.

Thanks,
Phil.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Can I make ExitDialog have a checkbox for Custom Actions?

Hi Phil,
If I add a checkbox to ExitDlg, it appears on the ExitDlg for Install, Maintenance, Patch, Resume modes. How do I make it appear only on Maintenance mode and not on the other run types?
Please note that the User Guide contains the Show a custom ExitDialog for Maintenance how-to which may help you.
If I wish to replace ExitDlg for Install/Maint with my own different dialogs, I am unable to delete ExitDlg. How can I do this?
I'm afraid that "ExitDialog" is mandatory and it cannot be removed.
If I want to call a custom action based on the checkbox result, I create the checkbox on the dialog, but then if I try to create a DoAction control event the Argument field dropdown box is empty and the OK button is greyed out so it cannot be saved.
Please note that a DoAction control event can use only "UI Custom Actions". A custom action scheduled under "InstallUISequence" or "InstallExecuteSequence" cannot be used by a control event. Please note that the User Guide contains the Execute custom action on button push how-to which may help you.
I need to set that property when the checkbox is checked. Is that the correct way to associate a Custom Action with a dialog property?
Note that the checkbox is associated with an installer property, set in the "Property Name" field in the "Properties" pane. Therefore, you can use the property of the checkbox to condition the custom action. If the checkbox is checked, its property will be set to the string specified in the "Value" field on the "Properties" pane. If the checkbox is not checked, its property will be empty.
I would like to add a checkbox to the Repair and Remove dialogs accessed from MaintenanceTypeDlg. According to MaintenanceTypeDlg Published Events these are called VerifyRepairDlg and VerifyRemoveDlg, however I can't find them in the Dialogs list to edit them. Is it possible to edit these dialogs?
Yes, these dialogs are under the "MaintenanceTypeDlg" dialog. In order to show them you can click the "+" sign next to it.
If I add a checkbox to MaintenanceTypeDlg when I run the install I am unable to check/uncheck it. Is this intentional?
No, the checkbox should be functional. Is the "Enabled" attribute set to "True" in the "Properties" page?
This is what I am trying to display in the Maintenance mode sequence:

PrepareDlg
MaintenanceWelcomeDlg
MaintenanceTypeDlg
ProgressDlg
CleanUserDataDlg (my custom dialog displaying checkbox to call a Custom Action)
ExitDialog
Please note that a custom dialog cannot be added after "ProgressDlg".

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
philh
Posts: 5
Joined: Sun Jan 18, 2009 10:09 pm

Re: Can I make ExitDialog have a checkbox for Custom Actions?

Got the installer working as required. Many thanks for all your help.

Return to “Common Problems”