How to set the InstallLocation property

by

After you install a MSI built by a Visual Studio setup project or WiX, you would expect that the registry would hold the path to which you installed your MSI.

The place in the registry to look is: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{ProductCode}

where ProductCode is the GUID specified in your setup project.

However the key InstallLocation is always empty. This is because the MSI generated doesn’t contain a value for the ARPINSTALLLOCATION property  (see http://msdn.microsoft.com/en-us/library/aa367589(VS.85).aspx).

The solution specified is to include a custom action which should set the ARPINSTALLLOCATION property to [TARGETDIR].

This article shows how to create a postbuild event to run a vbs script to update the MSI.

When you use WiX setup projects instead of Visual Studio setup projects you will need this article.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.