Set Property Values |
Setting public properties via the command line is a frequently used mechanism for passing information to an MSI (particularly during a silent install), if you wished you could also provide a dialog for entry of these values.
A transform is a more powerful alternative mechanism which may be used particularly as its much more powerful.
msiexec.exe /qn /i "C:\TMP\some.msi" SOMECONFIGURATION=TESTVALUE ACCEPTEULA=1
In the above "SOMECONFIGURATION" is the property (its case must be all capitals). To use in MSI registry or INI updates you would refer to it as "[SOMECONFIGURATION]". We also confirm that we accept the vendors "end user licence agreement" by configuring the property the vendor has provided (and documented) for that purpose.
Note that directory locations can be modified the same way as long as the key is in all upper case.
If the property contains spaces then you'd need to double quote it, for example:
msiexec.exe /qn /i "C:\TMP\some.msi" SOMECONFIGURATION="TEST VALUE"
See the "MSIEXEC.EXE - Setting Property Values to NULL" section for information on a MSIEXEC.EXE bug.
If it needs to contain double quotes then for each double quotes specify two (double them up), for example:
msiexec.exe /qn /i "C:\TMP\some.msi" CMDLLINEPARMS="-CmdLineSwitch1 ""some double quoted value"" -CmdLineSwitch2"
If these values differ in production versus development or system test environments then my recommendation is that you write the MSI to default to a production setup and override as required for others. This is less risky and all the risk is for non-production environments.
You should probably have defined the property using the MAKEMSI "Property" command and using the "persist" parameter to ensure the value specified on the command line is also known at repair time!
A verbose log of a user driven install can help you determine property and feature names, however failing this you can use "ORCA" for a more detailed examination of the relevant tables as well as examination of any custom actions.