5

I have an InstallShield .exe that 'wraps' an MSI installer. I can pass arguments to the MSI installer like this:

/v"..."

For example, to do a silent install: p4inst64.exe /S /v"/qn". The MSI installer will install 4 'features;, but I only want to install 1.

How can I specify feature selection for the MSI installer from the command line?

2 Answers 2

7

You can try to add ADDLOCAL to the command line:

p4inst64.exe /s /v"/QN /L*V "C:\test.log" ADDLOCAL="FeatureName""

I haven't tested this, but it should work ok, barring any issues with the quotes inside the parent quotes.

/L*V "C:\Test.log"= verbose logging
/QN = run completely silently
ADDLOCAL="FeatureName" = Install this feature locally 
3
  • Thanks! I had to run the installer once with verbose logging to find the feature names ("ADDLOCAL" is also used in the install log). Commented Jul 21, 2014 at 6:34
  • 1
    Most setups allow feature selection as part of its GUI. Either going into a "Custom setup" screen or as one of the normal dialogs in the "next dialog sequence". You can also open the MSI in Orca or another Installation tool. Commented Jul 21, 2014 at 12:49
  • setup.exe /v"MY_PROPERTY=\"Value Of Property\"" in case the above doesn't work. The \ character is an escape character for the " that follows. Commented Sep 8, 2016 at 13:22
2

I am adding a new answer with some alternative information - this might be useful if the scope of the modifications you need are larger than just a feature. See the end of the answer for a description of "transforms".

First, here are some screen shots so it is clear how to get the feature names. Here is a screen shot showing how you can find the feature names using Orca: Orca

Here is a couple of screen shots combined to show you how to see the features by running the MSI file itself. Dialogs and dialog sequencing can be changed for each MSI, but overall the concept is similar. Find the "Custom" dialog or just run the setup clicking "Next" until the feature list appears. Some setups have no feature list at all in the GUI, and then you need Orca or you can read the log file which you did.

MSI dialogs

Other, commercial installation tools or a trial installation of these (can be easier to install than the full SDK which is required to get Orca) can also be used to view the contents of an MSI file.

Finally: another way to modify what is installed by an MSI, as well as making other changes is to use a transform - a database modification snippet, or transaction that is applied to the original database to make changes for installation. Check this answer for an overview and this stackoverflow answer.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .