Project 2000. Local and Upgrade Installation, страница 7

Per-user, non-managed (Windows 95/Windows 98 and Windows NT 4.0):

Hkey_Current_User\Software\Microsoft\Installer\Products\ COMPRESSED_PRODUCT_GUID

Per-user, managed (Windows 2000):

Hkey_Current_User\Software\Classes\Installer\Products\ COMPRESSED_PRODUCT_GUID

Per-computer, managed and non-managed (Windows 95/Windows 98, Windows NT 4.0 and Windows 2000):

Hkey_Current_User\Software\Microsoft\Installer\Products\ COMPRESSED_PRODUCT_GUID


LastUsedSource and PackageName

When the installer finds the Product in one of these locations, it looks at the \Sourcelist key to find the PackageName and LastUsedSource location.

LastUsedSourcevalue is in the format:

<n/u/m (net/url/media)>;<item# from n,u, or m list>;<Sourcepath>

For example,

“n;1;\\united\dartest\public\”

When the package exists at the LastUsedSource, installer launches to install all the components in the feature, from the list of SQUIDs in:

Hkey_Local_Machine\Sofware\Microsoft\Windows\CurrentVersion\Installer\Features\COMP_PRODUCT_GUID

Feature_name = SQUID1SQUID2SQUIDn

A SQUID is simply a compressed (SQuished) GUID that is written to the registry to save space.

When the package does not exist at the install point in LastUsedSource, installer checks the \Sourcelist\[Net, URL, Media] sourcelist keys for alternate sources.

The sourcelist is checked in the order of Net, Media, URL by default – but setting the SearchOrder System Policy can change this.

When a correct MSI package file (correct Filename and Product code) is found at one of the sources, the installer proceeds to install the components. If a valid source is not found, the installer pops up the Network Resource Dialog box to give the user the option of specifying another valid source. However, if the DisableBrowse system policy is set, the browse button is not displayed to the user.

Once a source is selected or typed into the combo box, the source is validated. If valid, the installer proceeds to install the above. Otherwise, the installer brings the dialog box back up again and this continues until a valid source is found or the user cancels.

Source lists are explained in more detail in the next lesson.

Removing Components

Each installed component is registered in Hkey_Local_Machine with a list of products that are "clients" of that component. If four different products (as defined by the installer package code) install the same component (as defined by the installers component code), then there will be four products in the client list - in essence, a reference count of 4 on that component.

When the installer removes a component, it first checks the client lists of the component to make sure that no other installer based products are using that component. If there is another product in the list, the installer removes the product code of the product that is removing from the client list, and is done. If the list is empty except for the product the installer is uninstalling, then it performs a check of the SharedDLL key. If the installer finds a SharedDLL count that's higher than is expected, it leaves the entire component behind. Otherwise it will remove the entire component.

There also may be a registry entry at this location that is all zeros. This is a system component and is never removed.