command line option for features? - Advanced Installer Community
sfaust
Posts: 57
Joined: Tue Oct 13, 2015 11:57 pm

command line option for features?

I have looked around and can't find an answer here. What is the command line switch (if there is one) to turn a feature on or off for a silent install? For instance I have a feature named 'Revit 2014'. I have tried passing Revit2014="false" and updating to all caps in both the command line and feature identifier (so REVIT2014="False") but neither seemed to work.

Thanks,
Steve
sfaust
Posts: 57
Joined: Tue Oct 13, 2015 11:57 pm

Re: command line option for features?

Ok well I'm not sure if it's the best way or not but I solved my problem.

I created an install parameter called REVIT2014 and set it's value to 1 as I want it on by default. Then in the organization screen I can select the feature and put it's default to 'Installed'; then in the 'Disabled if:' entry I put 'REVIT2014 = 0'. Essentially I am setting it to a default of on to match the default state I want and the installer UI never touches that property so it never disables. However since it is a parameter the user can enter REVIT2014=0 in their command line to turn the feature off. If you want the reverse (default off, allow user to turn on) you would set the property to 0 in the AI project and installed if equal 1.

Anyway if there is a better way please let me know but that seems to be working.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: command line option for features?

Hello,

I can confirm you that your found solution is a good one. As another alternative you can use the "ADDLOCAL" property too. Just set this property from command line only with the feature identifiers you want to install.

If you have any questions just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”