InstallLocation
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.
Under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-21-1482476501-1220945662-725345543-1000\Products\525580035BBEF1E4F8E7485822C7FF05\InstallProperties
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!
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.
Under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-21-1482476501-1220945662-725345543-1000\Products\525580035BBEF1E4F8E7485822C7FF05\InstallProperties
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
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
MSIPackager
18 years ago
Posted by:
CCRMZ
18 years ago
Posted by:
CCRMZ
18 years ago
Ok.
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
Source column: ARPINSTALLLOCATION
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 .
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
Source column: ARPINSTALLLOCATION
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 .
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.