guidway
Posts: 11
Joined: Fri Nov 02, 2007 4:03 am

custom install, multiple directories

I am still somewhat new to Advanced Installer, but seem to be picking it up pretty quickly, however I am stumped at how to do this.

I have an application that needs to be installed in one location and data that needs to be installed in a different location (i.e. C:\AppLocation, C:\Data). I set up an installer package with multiple features (i.e. AppFeature, DataFeature) and when I click on Custom Install on my installer it gives me the ability to change the installation path of the application, but not the data feature.

If I click on Custom Install and select the Data Feature and change the path displayed, it changes the location of where the application is installed, not the data. It appears the Custom installation only allows one installation location for all features.

Is there a way to have different features installed in different locations (locations selected by the user for each feature, not hardcoded)?

Thank you for your assistance
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

This can be done by using property-based folders and a custom dialog. Here are the steps:
- go to the "Install Parameters" page and create a property for the feature, for example DATA_DIR with the value "C:\Data"
- go to the "Files and Folders" page and create a property-based folder using DATA_DIR
- add in this folder all the resources contained by the "DataFeature" feature
- go to the "Dialogs" page and select the "FolderDlg" dialog
- create a new Path Edit control and in the "Properties" section set the "Property Name" field to DATA_DIR
- the main feature can be installed by using "Application Folder"

Now, the path of the "DataFeature" feature will be set by the user through the Path Edit control. For this control you can create a Browse button like explained in this tutorial:
http://www.advancedinstaller.com/user-g ... older.html

If you need a sample project please contact me at support at advancedinstaller dot com and I will send it to you.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
guidway
Posts: 11
Joined: Fri Nov 02, 2007 4:03 am

sorry, I just got back to this (been working on another project). I attempted what you said, however by adding a FolderDlg to the dialogs it removes my SetupTypeDlg. I wanted the user to be able to choose the second data folder, but also still have the options to enable/disable certain optional components of the data. Did I add it incorrectly? It seems adding one causes the other to be removed.

thanks again (once again sorry for the delay)
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

Please note that the "FolderDlg" dialog was an example. You can add the path edit control on any dialog you want (on "VerifyReadyDlg" dialog for example).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”