I'm using Inno Setup to create an installer. When I run an installer of older version (e.g 1.0.0.2) on a computer that already has application of newer version (e.g. 1.0.0.3) installed I don't want files with the same name to be overwritten.
As I understand from here
- If the existing file is a newer version than the file being installed, or if the existing file has version info but the file being installed does not, the existing file will not be replaced.
Inno Setup help, Files section
running an installer of older version over existing newer version must NOT replace existing file.
I've created two installers. Older version (1) has:
AppVersion=1.0.0.2
VersionInfoVersion={#SetupSetting('AppVersion')}
and the newer version (2) has:
AppVersion=1.0.0.3
VersionInfoVersion={#SetupSetting('AppVersion')}
Both installers have the same Files section:
[Files]
Source: "D:\installer\test1003\*"; DestDir: "{app}\app"; Flags: recursesubdirs createallsubdirs
But when I run (1) having (2) installed file with the same name is replaced (and vice versa but that is logical as I understand)
I decided to create log files for both installers and that is what I got:
Dest filename: C:\Program Files\dir\app\tryout.txt
Time stamp of our file: 2019-01-23 13:02:10.000 Dest file exists.
Time stamp of existing file: 2019-01-23 13:01:50.000
Version of our file: (none)
Version of existing file: (none)
These parts are identical except for timestamps.
Any ideas on how to set versions for installed files?
Thanks in advance.
I'm not sure if that's important, but I'm using Unicode version of Inno Setup. Now it supports only one version, but I want to add more later.