Page 1 of 1

Select Certain features when running setup from command line

Posted: Tue Aug 29, 2006 1:36 pm
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?

Posted: Tue Aug 29, 2006 1:48 pm
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.

Posted: Tue Aug 29, 2006 1:52 pm
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.

Posted: Tue Aug 29, 2006 2:54 pm
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!

Posted: Tue Aug 29, 2006 3:44 pm
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!

Posted: Tue Aug 29, 2006 4:10 pm
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?