In the registry, how do I find out the install location of an installed product.
After installing a msi package, I can find the package code, product code and upgrade codes of the package and other information in the registry.


for the installed product code, I can get properties such as InstallSource, Version, DisplayName, Publisher, etc.
But the Property "InstallLocation" is always empty.

How do I find the installation folder that was selected by the user during installation?

Thank you!
0 Comments   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


Try looking here HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{product-code-guid} for an InstallLocation value.

Answered 12/17/2005 by: MSIPackager
Third Degree Black Belt

Please log in to comment
Thank you Rob for responding!

Yes, I had already checked that also, (should have mentioned it before), but the same thing: just an empty value.

I see some other products with an install location, but most with-out one.

Any other ideas?

Thank you for your help!
Answered 12/17/2005 by: CCRMZ
Yellow Belt

Please log in to comment

A Custom Action needs to be created in order for the InstallLocation to get set (using the ARPINSTALLLOCATION property).

I'm using the VB Studio .NET Installer to create the package and it doesn't create a custom action to do this.
All of the other registry values get set by MsiExec, except this one. I wonder why not? In the SDK Help it states that this generally gets set using a custom action. There must be a reason for doing this.

So, I will post what I did for anyone else that may have this problem:

I edited the MSI product using ORCA.

1. To the CustomAction table add a new custom action:

Action Column: SetInstallLocation
Type column: 51
Target column: [TARGETDIR]
(Using InstallShield the Target may be [INSTALLDIR]

2. To the InstallExecuteSequence table add the action:

Action Column: SetInstallLocation
Nothing needed in the Condition column
Gave it a sequence number under the Sequence column.

This sequence number will be a number which is just before the CostsFinalize record's sequence number (Sort on this column-head click-to make sure the sequence number is correct)

In my package the CostsFinalize has a sequence number of 1000.
The record prior to this one is IsolatedComponents and has a sequence number of 950. So I gave the new SetInstallLocation record a sequence number of 975.

After installing the package, the registry shows the InstallLocation where it was installed, under the registry keys Installed Products and Uninstall Product Code for my package's Product Code .
Answered 12/19/2005 by: CCRMZ
Yellow Belt

Please log in to comment