Hello,
In order to achieve what you want you can proceed like this:
- Go to "Files and Folders" page and add a shortcut to uninstall like this:
- Arguments: /i [ProductCode] ASK="uninstall"
Shortcut Target: [AI_UNINSTALLER]
- Go to
"Table Editor" page and select the "Registry" table. Set the "Value" field of the "UninstallString" row like this:
Code: Select all
[AI_UNINSTALLER] /i [ProductCode] ASK="uninstall"
- Go to
"Dialogs" page and add a new dialog in sequence (i.e. NewSeqDialog) after "Maintenance -> PrepareDlg". Here add a check box control like this:
- Text: Uninstall
Property Name: ANSWER
Value: checked
Default Value: checked
- On the [Next>] button add the following
published event:
- Name: Uninstall one or more features
Argument: ALL
Condition:
- Go to "Table Editor" page, select the "InstallUISequence" table and set the "Condition" field of the "ExitDialog" row like this:
Code: Select all
(NOT AiSkipExitDlg OR NOT AI_INSTALL) AND NOT ASK
- Go to
"Custom Actions" page, select the "Wizard Dialogs Stage" and from its context menu choose "Show standard action -> User Selection -> MaintenanceWelcomeDlg". In the "Execution Condition" field, from "Standard Action Properties" right pane, set the following condition:
- Select the "Wizard Dialogs Stage" and from its context menu choose "Show standard action -> ExecuteAction". In the "Execution Condition" field, from "Standard Action Properties" right pane, set the following condition:
- Move the "NewSeqDialog" custom action under "Wizard Dialogs Stage -> User Selection -> ResumeDlg". In the "Execution Condition" field, from "Standard Action Properties" right pane, set the following condition:
- Build and run your project.
Let us know if this helped.
All the best,
Daniel
FOLLOW US
Get the latest news in Application Packaging