1

Finalizing the version information written in a Windows binary exe, I found out that the field FileDate in FIXEDFILEINFO in file resource is always set up as 0. This FileDate field is given in FILETIME format. At first I thought it strictly means the creation date and time stamp of the files generated is Jan 1 1601 : File Date = 00:00:00 01/01/1601. But then, I found out that in many Microsoft date formats, the date number as 0 means the date is not valid, or not meaningful, or unspecified. Still, I haven't found clear info about the 0 meaning here.

I seek for files which haven't set it as 0 and I can't find any single one. All code sample on StackOverflow give 0 (Python there) or not specify this field (C++ there). Even the Windows system32 binaries use 0. So why no one is filling up this data with correct date ? Is there any guideline telling this can be let as 0 ? And what would be the benefit of a non-zero value there ?

antonio-fr
  • 54
  • 5
  • Having a hard time understanding, what this question is really asking for. What problem do you need to solve? – IInspectable Jun 05 '21 at 16:14
  • Thank you for your time. The question is : why the Windows exe resource FileDate fields in FIXEDFILEINFO (also described as Fixed File Info : File Date, or in the Win32 API documentation : the DWORD pair dwFileDateMS and dwFileDateLS) is ever ever set to 0, at least in all the the exe files I've examinated ? And what's the rational of setting this field to 0 ? There is no real problem about this, just a personal interrogation to know why everyone sets this as 0, and not as the actual exe building time (as it should, to me). – antonio-fr Jun 05 '21 at 19:18
  • There already exists [TimeDateStamp](https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-image_file_header) in the PE header, maybe that's why this one isn't used. – ssbssa Jun 06 '21 at 13:11
  • Historically, it's more likely, that the version information isn't used, because the filesystem (both FAT32 and NTFS) already store a creation timestamp. The timestamp in the PE header [has been repurposed in Windows 10](https://devblogs.microsoft.com/oldnewthing/20180103-00/?p=97705), giving reason to believe, that Windows doesn't care much about the creation time of modules. If you are deploying software and have a reason to encode the creation time, feel free to populate the version information. – IInspectable Jun 06 '21 at 15:44

0 Answers0