ometa joey
Posts: 5
Joined: Tue Dec 08, 2015 2:30 pm

Command Line Feature Selection

Hi All,

I am trying to make a PowerShell script to automatically run the Advanced Installer setup. How can we automatic install or skip the installation of certain features from our Feature Selection Tree component?

We have a lot of features, where some of them have parents. I was thinking to pass them as properties like this:

Code: Select all

someExe.exe /qb /L*V C:\Temp\install.log APPDIR="$($settings.applicationDirectory)" ADFeature="false"
I have also tried some variations:

Code: Select all

FEATURE_ADFeature="false"
FEATURE=ADFeature="false"
Our feature AIP looks like the following.

Code: Select all

<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
    <ROW Feature="ABE53E7EFB41529843DB0F4141C824" Feature_Parent="SAPFeature" Title="Visual C++ 2010 SP1 x86 (MFC Security Update)" Description="Visual C++ 2010 SP1 x86 (MFC Security Update)" Display="0" Level="1" Attributes="16" />
    <ROW Feature="ADFeature" Feature_Parent="SlaveFeature" Title="AD Interface" Description=" Display="23" Level="1" Directory_="APPDIR" Attributes="0" "/>
    <ROW Feature="ArchiveSystemObjectsFeature" Feature_Parent="DCSFeature" Title="Archive System Objects" Description="" Display="97" Level="1" Directory_="APPDIR" Attributes="0" />
    <ROW Feature="AuthorityServiceFeature" Feature_Parent="Services" Title="Authority Service" Description="" Display="89" Level="1" Directory_="APPDIR" Attributes="0"/>
    <ROW Feature="B63_41B8_9CB7_8C5E07C0FC18_" Feature_Parent="SAPFeature" Title="Visual C++ 2010 SP1 x64 (MFC Security Update)" Description="Visual C++ 2010 SP1 x64 (MFC Security Update)" Display="0" Level="1" Attributes="16" />
    <ROW Feature="BAMConfigFileFeature" Feature_Parent="BAMGlobalFeature" Title="Config File" Description="." Display="0" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_CustomARPName AI_ExePath BAM.LogDir BAM_ODBC_DRIVER CORE_ODBC_DRIVER ConfigDirectory"/>
    ...
Hope someone has experience with this.
Catalin
Posts: 7492
Joined: Wed Jun 13, 2018 7:49 am

Re: Command Line Feature Selection

Hello Joey,

In order to achieve that, you could use the ADDLOCAL property.

The ones that you have tried are not actual properties and that's why it is not working.

In addition to that, you could also condition each feature in the "Organization" page and then pass the condition in the command line - step 3 of the How to conditionally install a prerequisite based on the user selection? article.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ometa joey
Posts: 5
Joined: Tue Dec 08, 2015 2:30 pm

Re: Command Line Feature Selection

Hi Catalin,

I did it with the ADDLOCAL property where I pass a comma separated string of all the features. Works like a charm!

Example:

Code: Select all

ADDLOCAL=ADFeature,AuthorityServiceFeature
Thanks for your quick support!
Liviu
Posts: 1325
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Command Line Feature Selection

You're always welcome!

Glad to hear it worked.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”