Hello,
Add a custom dialog right after the Folder Dialog (Folder dialog being the one that allows the user to change the default install directory. I know how to do this part.
Select the
FolderDlg from the
Dialogs page and use the
New Dialog toolbar button.
We need to be able to retrieve the actual directory that the program was installed in. How can we get this value?
Please note that the installation folder of the previos application is retrieved by the
AI_RESTORE_LOCATION action during an upgrade. The folder’s path is stored in the
APPDIR property.
So, do you perform an upgrade of an installation package which is build with Advanced Installer?
Have a conditional (show only if) for showing the custom dialog based in if the user selected the default install directory. If they did chose the default install directory then we want to show the custom dialog. Not sure how to do this?
In order to achieve that you can define a property in
Install Parameters page which will contain the default installation path.
If the installation path has been changed, (e.g. the user selected a different installation folder than the default one in the
FolderDlg) you can show the related dialog.
I’ve attached a sample which implements this scenario.
I’ve defined a property (DEF_PATH) in the
Install Parameters page. In the
Custom Actions page. I’ve added the predefined
Set installer property custom action to set the property value with the default value of the
APPDIR
If the user has selected a different installation folder, then I show the related dialog through the
Show only if… condition(e.g. NOT (DEF_PATH=APPDIR) ).
You can take a look on the
How do I conditionally show the "StartMenuShortcutsDlg" dialog? article which may be useful.
We need to ask the user a question on the custom dialog and update a variable in an XML file based on their answer. I think you have native support for updating XML files? Not sure how to do this. Not sure how to retrieve response from custom dialog.
This is possible through the
XML Feature. Also, please take a look on the
How do I import and edit a XML file? article which may be useful to you.
Please let us know if that helped.
Best regards,
Dan
FOLLOW US
Get the latest news in Application Packaging