2
votes

I have an application that automatically updates itself each time it is run. It does this by comparing the "modified" timestamp on each file in the program directory, copying files that are newer from a network file share.

I packaged this program with Inno Setup Compiler and ran the resulting installer on a test system. All of the installed files have timestamps one second older compared to the files I used when compiling the installer. This causes every file in the program directory to be recopied from the file share on first run. This is an issue for our remote users that have limited bandwidth.

I've tried this numerous times, with and without the "TimeStampsInUTC" directive set in my Inno Setup script and on four different test systems. The timestamps are consistently one second off.

Could this be a problem in Inno Setup Compiler? Are there any suggestions to work around this issue? I'm hoping to use this installer at two new offices soon.

1
What filesystem is used by the drive, that you have installed your application to?Martin Prikryl
These are all NTFS volumes. Systems are a mix of Windows 7 and 10.whysyn

1 Answers

1
votes

There's TimeStampRounding directive, which is by default set to 2:

By default, time stamps on files referenced by non external [Files] section entries are rounded down to the nearest 2-second boundary. FAT partitions have only a 2-second time stamp resolution, so this ensures that time stamps are set the same way on both FAT and NTFS partitions.

The rounding can be altered or disabled by setting the TimeStampRounding directive. Setting it to 0 will disable the rounding. Setting it to a number between 1 and 60 will cause time stamps to be rounded down to the nearest TimeStampRounding-second boundary.

(emphasis mine)