Jamie.Garroch
Posts: 8
Joined: Wed Jan 29, 2020 8:56 pm
Contact:  Website Twitter

How to set Files section to use locale time zone

Mon Aug 03, 2020 2:47 pm

I have a large MSI project which includes several hundred MB of graphical asset files which are pulled into the MSI from a file server. These files are installed on the user's machine via the MSI and then a Windows Scheduled Task uses Robocopy to keep the files up to date with a file server mirror.

The problem is that the MSI installs the files with the modified time stamp of the source file based on the locale of the build PC rather than updating it to the locale of the target PC. So for any user that is ahead of the time zone used by the machine to build the MSI, all of the installed files are considered to be out of date by Robocopy, negating the benefit of including the files in the MSI and causing huge network traffic for thousands of users.

Example:

Source file on the file server has a time stamp of 3rd August 2020 09:00 and the build PC local is set to UTC.
Destination PC locale is UTC+1 but the file is installed with a time stamp of 09:00 as opposed to 10:00
Result: Robocopy thinks that the file needs to be updated because the file server time is returned based on the user's local e.g. 10:00

If I manually copy files from the source to the destination, the time stamp is synchronized with the locale.

Is there a way to tell the MSI to set the modified time stamp of installed files to be updated according to the locale of the installation PC?

Catalin
Posts: 6544
Joined: Wed Jun 13, 2018 7:49 am

Re: How to set Files section to use locale time zone

Wed Aug 05, 2020 2:49 pm

Hello Jamie,

To be fully honest with you, I was totally unaware of this behavior up until now.

I've done some tests on our end and I was indeed able to replicate the behavior.

As you may already know, the files are copied on the target machine during the "InstallFiles" standard action.
Is there a way to tell the MSI to set the modified time stamp of installed files to be updated according to the locale of the installation PC?
Unfortunately, I am afraid I am not aware of any method in which you can achieve that. Although I doubt they can help, you could try to contact the Microsoft's support team.

Please let me know if there is anyhing else I could help you with and I will gladly assist.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Jamie.Garroch
Posts: 8
Joined: Wed Jan 29, 2020 8:56 pm
Contact:  Website Twitter

Re: How to set Files section to use locale time zone

Wed Aug 05, 2020 3:11 pm

Thank you so much for looking into this Catalin. So I understand the behaviour is as a result of calling the Microsoft InstallFiles action rather than anything related to Advanced Installer. In this case, I might try to contact Microsoft via my MVP status. If I discover anything else I'll report back here. There is also a similar discussion here which I've just been made aware of: https://www.itninja.com/question/timest ... -installed
I live, breathe and sleep PowerPoint automation, so you don't have to!
https://brightcarbon.com

Catalin
Posts: 6544
Joined: Wed Jun 13, 2018 7:49 am

Re: How to set Files section to use locale time zone

Wed Aug 05, 2020 4:28 pm

You are always welcome, Jamie!
If I discover anything else I'll report back here.
If you could, this would be awesome as I would also like to know if there is any way to achieve this.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”