Project 2000. Windows Installer, страница 11

All other things being equal, if the file being installed has a different language than the file on the machine, favor the file with the language that matches the product being installed. Language neutral files are treated as just another language so the product being installed is favored again.

This is new setup behavior that is introduced by Window Installer. The behavior is motivated by the desire to guarantee the application being installed will function.


Mismatched Multiple Languages

All other things being equal, after factoring out any common languages between the file being installed and the file on the machine, any remaining languages are favored according to what is needed by the product being installed.

Example:

n  Both files have the same version.

n  The file on the machine is a multi-language file (English, French, and Spanish)

n  The file to be installed is a multi-language file (English, Italian, and German).

The new file is installed since there are languages’ remaining after English is factored out.

Preserve Superset Languages

All other things being equal preserve the file that supports multiple languages regardless of whether it is already on the machine or is being installed.

Example 1:

n  Both files have the same version.

n  The file on the machine is for English and French.

n  The file being installed is for English, French, and Spanish.

The new file is installed since it supports a superset of the languages that the file on the machine supports.

Example 2:

n  Both files have the same version.

n  The file on the machine is for English, German and Italian.

n  The file being installed is for German.

The existing file is used since it supports a superset of the languages that the file being installed supports.


Non-versioned Files Are User Data

All other things being equal, when the Modified date is later than the Create date for the file on the machine, Window Installer does not install the file because user customizations would be wiped out. When the Modified and Create dates are the same, the file is installed. Windows Installer assumes that if the created and modified dates are essentially the same that the file does not contain any user data so it is safe to overwrite.


Non-versioned Files Using Companion

All other things being equal, a non-versioned file that is associated with a versioned file using the companion mechanism abides by the rules for the versioned file. The only exception is when the versioned file on the machine and the versioned file being installed have the same version and language but the companion file is missing on the machine. In this case, the companion file being installed is used even though the versioned file on the machine is used.

Non-versioned files can inherit installation rules from a versioned file using the “companion file mechanism”. Placing the primary key of a versioned file in the Version field for a non-versioned file associates these two files as “companions”. An example would be an application executable like MYWARE.EXE and a corresponding settings file like MYWARE.SET. In general, the settings file should follow the same installation rules as the application executable. So if the companion versioned file being installed gets used, so should the non-versioned file being installed. The only exception is when the versioned file being installed is identical to the versioned file on the machine, but the non-versioned companion file is missing on the computer. In this case the non-versioned companion file being installed is used even though the versioned file being installed does not get used.

Rules Are Global

The rules for determining when to install a file reside in one place within the installer and are global, meaning they apply to all files equally. For example, an author of the installation of a product cannot specify to always overwrite a particular file