Hi all,
We have page flow of
We have a validation which will happen when the user press NEXT from Installation Directory page. The validation is to check whether app is already installed in the chosen installation directory ot. Based on the validation we will show a Question dialog. If user chooses 'yes' then we will proceed with next page (Ready to install page). If user chooses 'no' then we should stay in Installation Directory page. But we are not able to stay in Installation Directory page. Since we have pressed NEXT in Installation Directory page, the UI moves to next page even if I choose 'no' in Question dialog.
After Clicking NO We have to stay back in Installation Directory page
But it goes to Ready to install page
How to do it? Please help me..
Thanks
Here is the sample code
<project>
<shortName>sample</shortName>
<fullName>null</fullName>
<version>1.0</version>
<componentList>
<component>
<name>default</name>
<description>Default Component</description>
<canBeEdited>1</canBeEdited>
<selected>1</selected>
<show>1</show>
<folderList>
<folder>
<description>Program Files</description>
<destination>${installdir}</destination>
<name>programfiles</name>
<platforms>all</platforms>
<shortcutList>
<shortcut>
<comment>Uninstall</comment>
<exec>${installdir}/${uninstallerName}</exec>
<icon></icon>
<name>Uninstall ${product_fullname}</name>
<path>${installdir}</path>
<platforms>all</platforms>
<runAsAdmin>0</runAsAdmin>
<runInTerminal>0</runInTerminal>
<windowsExec>${installdir}/${uninstallerName}.exe</windowsExec>
<windowsExecArgs></windowsExecArgs>
<windowsIcon></windowsIcon>
<windowsPath>${installdir}</windowsPath>
</shortcut>
</shortcutList>
</folder>
<folder>
<description>Program Files</description>
<destination>${installdir}</destination>
<name>programfileslinux</name>
<platforms>linux</platforms>
</folder>
<folder>
<description>Program Files</description>
<destination>${installdir}</destination>
<name>programfileswindows</name>
<platforms>windows</platforms>
</folder>
<folder>
<description>Program Files</description>
<destination>${installdir}</destination>
<name>programfilesosx</name>
<platforms>osx</platforms>
</folder>
</folderList>
<startMenuShortcutList>
<startMenuShortcut>
<comment>Uninstall ${product_fullname}</comment>
<name>Uninstall ${product_fullname}</name>
<runAsAdmin>0</runAsAdmin>
<runInTerminal>0</runInTerminal>
<windowsExec>${installdir}/${uninstallerName}.exe</windowsExec>
<windowsExecArgs></windowsExecArgs>
<windowsIcon></windowsIcon>
<windowsPath>${installdir}/</windowsPath>
</startMenuShortcut>
</startMenuShortcutList>
</component>
</componentList>
<enableRollback>1</enableRollback>
<enableTimestamp>1</enableTimestamp>
<vendor>NULL</vendor>
<parameterList>
<directoryParameter>
<name>installdir</name>
<description>Installer.Parameter.installdir.description</description>
<explanation>Installer.Parameter.installdir.explanation</explanation>
<value></value>
<default>${platform_install_prefix}/${product_shortname}-${product_version}</default>
<allowEmptyValue>0</allowEmptyValue>
<ask>yes</ask>
<cliOptionName>prefix</cliOptionName>
<mustBeWritable>yes</mustBeWritable>
<mustExist>0</mustExist>
<width>40</width>
<validationActionList>
<showQuestion>
<default>yes</default>
<text>Do you want to uninstall the existing app</text>
<variable>shoulduninstall</variable>
<ruleList>
<fileExists>
<path>${installdir}/uninstall.exe</path>
</fileExists>
</ruleList>
</showQuestion>
</validationActionList>
</directoryParameter>
</parameterList>
I'm attaching an update version of your validation:
<validationActionList> <actionGroup> <actionList> <showQuestion> <default>yes</default> <text>Do you want to uninstall the existing app</text> <variable>shoulduninstall</variable> </showQuestion> <throwError> <text>The previous installation must be removed before continuing.</text> <ruleList> <compareText> <logic>equals</logic> <text>${shoulduninstall}</text> <value>no</value> </compareText> </ruleList> </throwError> </actionList> <ruleList> <fileExists> <path>${installdir}/uninstall.exe</path> </fileExists> </ruleList> </actionGroup> </validationActionList>