Hello,
It is mandatory to define the highest possible file version for your file in the setup package when you want it to always overwrite at install time an existing file on disk. However, the file version specified in the setup package won't be effectively set on your file at install time. It will be only used when Windows Installer decides to overwrite an existing file on disk at install time.
Windows Installer decides if a file needs to be overwrite based on the following method: It first compares the file version from the disk with the file version defined in the setup. If the file version is the same it compares the date of the files. If the date is also the same it compares the language. You can find more information regarding this subject in the
"File versioning rules" article.
For example if you have a file with version 1.0.0 on your disk and include in the setup the 2.0 version, the file will be overwritten if "Overwrite only if the existing file is older" is selected. Advanced installer gives you the opportunity to always overwrite a file by creating a "virtual" file version for the file in the setup, which is the maximum file version possible:
When you select "Always overwrite existing file" option, the version of the file from disk will be compared with 65535.65535.65535.65535, thus the version of the file from the disk will be always smaller or equal. Please keep in mind that the real file version will not be 65535.65535.65535.65535. This value is only used by Windows Installer in the former algorithm.
All the best,
Daniel
FOLLOW US
Get the latest news in Application Packaging