Maintaining a Microsoft Project 2000 Installation, страница 4

The Media Sourcelist is stored under:

Hkey_Current_User\Software\Microsoft\Installer\Products\{PackageCode} \SourceList\Media

It may contain the following values:

Name

Data

Description

Default

(value not set)

DiskPrompt

(REG_SZ)

Friendly name that describes all CDs or other media disk. Contains a template entry that gets filled in for the appropriate disk in a sequence. The template entry gets filled in with the appropriate DiskPrompt entry from the Media table, which appears under the <DiskID> key below.

<DiskID>

(REG_SZ)

Contains both the volume label of the appropriate disk in the sequence, as well as the variable string, which gets plugged into the template DiskPrompt value above to form a complete user prompt.

List of URL Sources

Like network sources, URL sources are handled the same way. The list of URL sources is stored in the following registry key:

Hkey_Current_User\Software\Microsoft\Installer\Products\{PackageCode} \SourceList\URL

It may contain the following values:

Name

Data

Description

<Index>

(REG_EXPAND_SZ)

A fully qualified URL: “Http://www.microsoft.com/apps/office2k”

“file://www.microsoft.com/apps/download”

As with the network list <Index> is the first positive integer not already in use as the value name in the URL list. There is a limit of 26 URLs that can be stored in the list. A sample list of URL sources might look like the example below:

Name

Data

(Default)

(no set value)

1

“http://www.microsoft.com/download”

2

“file://\\families\installapps”

3

“http://appserver/%GROUPNAME%/apps”


Searching the Source List

When there is a need to install or repair a feature from the source, the installer performs the following steps:

1.  The installer retrieves the PackageName value from the SourceList key, if available. It then appends the PackageName value to the value in the LastUsedSource key. A back-slash is added between the source and the PackageName since the sources may not have a trailing back-slash.

2.  The resulting fully qualified path to an installer package is checked for validity, meaning the existence of the package file is checked. For Media sources only the first disk contains the MSI. For these disks the installer verifies that the volume label is correct.

If the package file exists the source is deemed to be valid.

Once a valid source has been found, that source is cached in memory for the process that requested it. This means that a given source is trusted as valid during a single session of a given application. If the source becomes unavailable during a session after it has been previously validated during that same session, the installer does not go back through checking for a valid source. The user will receive an error and must try to install the component or feature again.

Should this check fail for any reason, the source is deemed invalid. The installer then begins looking through the list of network sources and the list of URL resources. By default the installer looks through the network drives first, followed by any disks that might be in the removable media drive or drives (for example, a CD-ROM changer) and finally any URL sources.

If after the installer has checked the LastUsedSource value and all additional sources in the network list, media list and URL list there remains no valid source, the installer will give the user the opportunity to browse for a new valid source.


Source Browsing

The Window Installer provides two distinct browse dialogs; one for browsing network sources and one for browsing Media sources. The decision of which one to display is made according to the following rule: