Select Certain features when running setup from command line

Got a problem you cannot solve? Try here.
Post Reply
seanmckenna
Posts: 46
Joined: Tue Aug 22, 2006 9:16 am
Location: NorthEast, USA
Contact:

Select Certain features when running setup from command line

Post by seanmckenna »

Does anyone know the best way to select certain features when running a setup from the command line? I am doing a silent install, but I want to have some control over what gets installed. Am I overlooking something?
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

You could read the pre-defined variable SILENT, and if TRUE, you could call Set Component State to select the components you desire.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
seanmckenna
Posts: 46
Joined: Tue Aug 22, 2006 9:16 am
Location: NorthEast, USA
Contact:

Post by seanmckenna »

Thanks Michael, but I guess what I really want is to be able to set variables on the commandline to pick the different features.

It seems like I am going to need a variable for each feature I want to select, and I'll need to select/unselect based on this. This looks like it requires a bit more work than I was hopping, but oh well.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

It's really easy, actually. You can use the CMDLINE variable together with the If command and the Contains parameter (case insensitively, if you wish), to just read your own custom-defined parameters from the command line and select the necessary components.

You'll have full flexibility in crafting your custom command line!
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
seanmckenna
Posts: 46
Joined: Tue Aug 22, 2006 9:16 am
Location: NorthEast, USA
Contact:

Post by seanmckenna »

Great, that sounds good. I'm just missing one little peice. In my setup, I have two seperate prjects: InstallerA, and InstallerB.

InstallerB is much smaller and is a product on its own, but it is also part of a larger product, InstallerA. In InstallerA, I want to list all of the features for InstallerB, and automatically select them.

In the past, I had been running InstallerB silently from the commandline at the end of InstallerA's setup.

My question now is, can I do this? I see how I can pass arguments to the commandline, but how can I construct them in InstallerA? If I could have a string property, I would just add on the names of different features ... but I don't think I can do it like this

if component1 is Selected then
CmdLineString += "comp1"
end
if componet2 is Selected then
cmdLineString += "someOthercomponent"
end

But I can't figure out how to do this!
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

If you are trying to concatenate a string to a variable that already holds another string, just do this with Set Variable.

Ex: Set Variable MYVAR to $MYVAR$ and extra stuff

So if MYVAR contained this, then it would now contain this and extra stuff

Does that answer your question?
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Post Reply