Because unnecessary file copying slows an installation, the Windows Installer determines whether the component's key file is already installed before attempting to install the files of any component. If the installer finds a file with the same name as the component's key file installed in the target location, it compares the version, date, and language of the two key files and uses file versioning rules to determine whether to install the component provided by the package. If the installer determines it needs to replace the component base upon the key file, then it uses the file versioning rules on each installed file to determine whether to replace the file.
Note that when authoring an installation package with versioned files, the version string in the Version column of the File table must always be identical to the version of the file included with the package.
The default file versioning rules can be overridden or modified by using the REINSTALLMODE property. The installer uses the file versioning rules specified by the REINSTALLMODE property when installing, reinstalling, or repairing a file. The following example shows how the installer applies the default File Versioning Rules. The default value of the REINSTALLMODE property is "omus".
The following component key files are installed on the system before the component is reinstalled.
File | Version | Create date | Modified date | Language |
---|---|---|---|---|
FileA | 1.0.0000 | 1/1/99 | 1/1/99 | ENG |
FileB | 2.0.0000 | 1/1/99 | 1/1/99 | ENG |
FileC | 1.0.0000 | 1/1/99 | 1/1/99 | ENG |
FileD | 1.0.0000 | 1/1/99 | 1/2/99 | ENG |
FileE | none | 1/1/99 | 1/1/99 | none |
FileF
(modified > create) |
none | 1/1/99 | 1/2/99 | none |
FileG | 1.0.0000 | 1/1/99 | 1/1/99 | ENG |
FileH | 1.0.0000 | 1/1/99 | 1/1/99 | ENG,FRN,SPN |
FileI | 1.0.0000 | 1/1/99 | 1/1/99 | ENG,FRN |
FileJ | 1.0.0000 | 1/1/99 | 1/1/99 | ENG,GER,ITN |
The following component key files are included in the installer package.
File | Version | Create date | Modified date | Language |
---|---|---|---|---|
FileA
(marked same) |
1.0.0000 | 1/1/99 | 1/1/99 | ENG |
FileB
(earlier version) |
1.0.0000 | 1/1/99 | 1/1/99 | ENG |
FileC
(later version) |
2.0.0000 | 1/1/99 | 1/1/99 | ENG |
FileD
(later version) |
2.0.0000 | 12/31/98 | 1/10/99 | FRN |
FileE
(marked same) |
none | 1/1/99 | 1/1/99 | none |
FileF
(new file) |
none | 1/3/99 | 1/3/99 | none |
FileG
(new language) |
1.0.0000 | 1/1/99 | 1/1/99 | FRN |
FileH
(new language) |
1.0.0000 | 1/1/99 | 1/1/99 | ITN,ENG,GER |
FileI
(more languages) |
1.0.0000 | 1/1/99 | 1/1/99 | ENG,FRN,SPN |
FileJ
(fewer languages) |
1.0.0000 | 1/1/99 | 1/1/99 | GER |
The following component key files stay on the system after the component is reinstalled. The state of the key file determines the state of any other files in the component.
File | Version | Create date | Modified date | Language |
---|---|---|---|---|
FileA (original) | 1.0.0000 | 1/1/99 | 1/1/99 | ENG |
FileB (original) | 2.0.0000 | 1/1/99 | 1/1/99 | ENG |
FileC (replacement) | 2.0.0000 | 1/1/99 | 1/1/99 | ENG |
FileD (replacement) | 2.0.0000 | 12/31/98 | 1/10/99 | FRN |
FileE (replacement) | none | 1/1/99 | 1/1/99 | none |
FileF (original) | none | 1/1/99 | 1/2/99 | none |
FileG (replacement) | 1.0.0000 | 1/1/99 | 1/1/99 | FRN |
FileH (replacement) | 1.0.0000 | 1/1/99 | 1/1/99 | ITN,ENG,GER |
FileI (replacement) | 1.0.0000 | 1/1/99 | 1/1/99 | ENG,FRN,SPN |
FileJ (original) | 1.0.0000 | 1/1/99 | 1/1/99 | ENG,GER,ITN |
See Also
Send comments about this topic to Microsoft
Build date: 8/13/2009
© 2009 Microsoft Corporation. All rights reserved.