Harish
Posts: 35
Joined: Tue Dec 27, 2005 9:25 am

Install According to ini file.

Hi,

We have a project in that the installation should proceed based on ini file. To be clear. I have 2 directories to be installed at different locations, we have an input.ini file in which we have CompassDiagnostics. If CompassDiagnostics=Y then it has to install other wise it should not install.
Can it be achieved using advanced Installer.

Thanks,
Harish.Y
Mike
Posts: 292
Joined: Wed Jun 01, 2005 10:50 am
Location: Craiova, Romania
Contact: Website

Hi,

Yes, you can achieve this kind of requirement using Advanced Installer.

However, there could be an easer way. Why do you want to condition the installation based on an INI file? Under what conditions would the settings in the file change?

Please detail the exact scenario that you have in mind so we are able to suggest the best solution.

Regards,
Mihai
Mihai Bobaru
Advanced Installer Team
http://www.advancedinstaller.com
Harish
Posts: 35
Joined: Tue Dec 27, 2005 9:25 am

Hi,

To tell you exactly, we have one client and we will we working for that clent and the client has many clients in different countries. Actually these are two projects. The second one is made especially for particular client so its a logic or secracy of not giving access to second project based on INI. I want the steps in achieving this.

Thanks,
Harish.Y
Mike
Posts: 292
Joined: Wed Jun 01, 2005 10:50 am
Location: Craiova, Romania
Contact: Website

Hi,

I assume that the two projects that your project contains are in two separate features.

The easiest way is to use the EXE bootstrapper that AI provides. Go to "Media" page and enable the "Create EXE setup file". Choose to leave the install file outside. Build the project.

Go to the folder where the MSI file was built. Next to it there is an INI file. Add a new entry named MainAppCmdLine. Set it's value to the list of features that should be installed. If there is more than one separate the names by commas.

Code: Select all

MainAppCmdLine=ADDSOURCE=MainFeature
The names of the features are (in the order that they appear in the tree): MainFeature, Feature, Feature_1, Feature_2 etc. You can also see the names by examining the AIP file.

If you want all the features to be installed simply clear that INI entry.

Hope this solves the problem.

Regards,
Mihai
Mihai Bobaru
Advanced Installer Team
http://www.advancedinstaller.com
miked
Posts: 18
Joined: Mon Jun 05, 2006 6:50 pm
Location: Maine, USA
Contact: Website

Mike wrote:

Code: Select all

MainAppCmdLine=ADDSOURCE=MainFeature
Hi, I'm a little unclear on two things.

1. The syntax for the INI file. Should the INI entry look like:

Code: Select all

MainAppCmdLine=ADDSOURCE=MainFeature (Your above example)
OR

Code: Select all

MainAppCmdLine=msiexec /i Setup.msi ADDSOURCE=MainFeature
I seem to get the MSI Help dialog either way I try it.


2. Aslo, is "ADDSOURCE" a standard property? Can I use that to selectively run different Features I've set up?
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

ADDSOURCE property is a list of feature to be installed. Currently AI automatically add the name of a feature like this: MainFeature (default), Feature (first feature), Feature_1 (second feature), etc.

Here's an example on how to use ADDSOURCE property, in this case only the feature (Feature) is marked for installation:

Code: Select all

MainAppCmdLine=ADDSOURCE=Feature
Regards,
Gigi
_________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
miked
Posts: 18
Joined: Mon Jun 05, 2006 6:50 pm
Location: Maine, USA
Contact: Website

Got it! All set - thanks for the help!

Return to “Common Problems”