Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Install Location written to Registry


1 reply to this topic

Superfreak3

Superfreak3
  • Full Members
  • 437 posts

Posted 25 July 2005 - 21:05

I have a question regarding what is written to the registry during an install of our software.

After installing the software I do a search of our product name and find some of the information I'm looking for.

One area of interest is the InstalLocation. This appears blank in the registry entry, however, when I attempt an upgrade, the process seems to know the previous install location. If I installed initially to D:\, let's say, when the Destination dialog appears, D:\ appears or is defaulted to.

Where or in what property is this information held? I expected to see it in the InstallLocation are of the Product information in the registry, but, like I said, there is nothing there.

When I check in Help, I see this item is part of the ProductInfo property. The InstallLocation references ARPINSTALLLOCATION. It indicates that this property is usually set via a Custom Action. I am not currently doing anything with this in our install.

Is this why I can't see any value there in the registry?

Our install process is functioning properly in that it seems to default on upgrade to the correct install location, but I was just wondering how all of this works.

Any info., as always, is greatly appreciated.

THANKS!!


Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 26 July 2005 - 08:52

Every component has a directory-'variable', that describes a destination. Multiple components can share the same variable (eg. System32) or use different variables.
Features have directory-variables as well. The main reason is that you can use a dialog with a feature tree, and set the destination for the active feature.

This info is persisted for maintenance tasks, how could Windows Installer uninstall without knowing the folders? The info is stored in HKLM\Software\Microsoft\Windows\CurrentVersion\Installer, but note that the structure is not documented. If you want to know where a certain component is installed, use MsiGetComponentPath().

The concept of installing to multiple directories is to complicated for certain users. so ARPINSTALLLOCATION was introduced. Usually it contains INSTALLDIR. I assume Microsoft introduced this parameter to show in Add/Remove Programs, but decided later to remove it from the dialog. You can find this info in HKLM\Software\Microsoft\Windows\CurrentVersion\Installer\<GUID>
or use MsiGetProductInfo().