cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nvadnais
Level 3

Synchronizing installs across time zones

This has been an issue (I know, they call it a feature) since automated installs began. It is not an InstalledState issue but rather an MSI issue, or you could just say an installer issue in general. But hopefully someone before me has already dealt with this and can point me in the right direction.

By default, install times are always local. You install the program in New York, and the files get a 10:00 AM ET timestamp. You install the program in Los Angeles, and the files get a 10:00 AM PT timestamp. Not that big a deal unless, post install, these files are maintained by an active web service synchronizing everything to UTC. That is the situation I have. The last thing I need after the install is to have every component installed turnaround and update itself off of the web service.

My preference would be to have the time in the MSI treated as the UTC time (we can manipulate that). Then when the install goes through the create/adjust timestamp process for each file, the adjust timestamp process adjusts the supplied UTC time to the time zone of the current computer (standard NTFS time processing). If the file-by-file adjust time process is not modifiable, then I would need a post-install process to go through the installed file list and adjust the times. Either way, I need to be able to control the time to UTC rather than "local time".

Any help or direction on how to make this happen is GREATLY appreciated!
Labels (1)
0 Kudos
(6) Replies
nvadnais
Level 3

Has no one run into this before?

Norman
0 Kudos
Johannes_T
Level 6

If your post-install process depends on last-changed date (does it?), then why don't you simply use setFileInfo to change the date/time of your files?
Greetings
0 Kudos
nvadnais
Level 3

Yes, I have seen that. But I am more comfortable at this time with VBScript, so I am likely to use that.

Unless, of course, you know of some sort of tutorial that will jump start me doing this in InstallScript 😄 ?

Norman
0 Kudos
Johannes_T
Level 6

Should be simple, but seems to be rather complicated. I just looked around for a way to add the offset (which can be found in registry) to the local time, which seems to be impossible with "on-board" functions - only by hand.
Good luck and let me know when you found a solution.
Greetings
0 Kudos
nvadnais
Level 3

I have a VBScript that works when run external to the MSI and does everything I need. 🙂

I can't seem to get it to run inside the MSI. :confused:

How do I debug this so I know it even tried to run it? How do I find out if the two passed values (I am reading INSTALLDIR and SourceDate via Session.Property; SourceDate I populated myself) even get to the code? Can I add logging to my VB script (either its own log or into the MSI log)?

The manuals are just not clicking for me yet on the Custom Action VB code. Kind of like trying to use a dictionary to figure out how to spell a word (if you don't know how, it doesn't seem to help you get there).

Thanks for any help someone can provide!
0 Kudos
nvadnais
Level 3

Got it! 😄

Venturing into new territory is never easy, but I think I have it now. Just one more thing the developers asked me to do. Does anyone know a quick trick for getting the installation date & time into a project property?

Thanks!

Norman
0 Kudos