MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: Repair ALL files[Next]: Selecting Features
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Windows Installer FAQ (the basics)->MSIEXEC.EXE->Set Property Values

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.


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: Repair ALL files[Next]: Selecting Features


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Sunday February 28 2016 at 3:45pm
Visit MAKEMSI's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.