Wednesday, September 17, 2008

Everything You Want to Know About Properties

Ever wondered how many properties are set or can be set during an installation?

Here is a great page which you can refer to for all the properties you ever wish to hear about Windows installer.

Installation of MSP File in Silent Mode

The best way to install an MSP file in silent installation is with the following command line:

msiexec /p patchfile.msp REINSTALL=ALL REINSTALLMODE=omus

But if you do not give the command line options of REINSTALL and REINSTALLMODE then it will not patch the existing installation package. What it will do is update the locally cached copy of the MSI database.

You can also use following command line to install patches like for Adobe etc.:

msiexec /update patchfile.msp /qb!

If you run the MSP in UI mode then it will patch the installation and will also update the locally cached copy of the installation, because when the dialogs are run they in turn set REINSTALL and REINSTALLMODE.

For installation of MSU, which is used as update in Windows Vista and above, please follow this new post on my blog:

Tuesday, September 09, 2008

Using VBScript to Set Properties in MSI

We can easily use Set Property Custom Action to set Windows Installer Property, but sometimes we wish to set the property directly in VbScript, specially if we are taking an input from a user through VBScript. Hope this tip helps.

To set property through VBScript we can use "Session" object like:


or we can directly use Property keyword like:


The only catch here is that we cannot set INSTALLDIR property through the above method as the package uses Directory table to store the value of INSTALLDIR. We need to write the below VBScript to set INSTALLDIR:

dim instpath

instpath = "C:\newpath\newfolder"


Remember to place this Custom Action after CostFinalize if you are changing the value of INSTALLDIR property in UI Sequence.