I'm trying to use 'Comment' field of VERSIONINFO resource. The target program is 64-bit windows EXE file (compiled with VS 2015).
All elements like version, copyright, description and so on are shown correctly - except "Comments". I define it just like other elements of StringFileInfo block. Something like that:
VS_VERSION_INFO VERSIONINFO
FILEVERSION FILEVER
PRODUCTVERSION PRODUCTVER
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "000004b0"
BEGIN
VALUE "FileDescription", PROGRAM_NAME
VALUE "LegalCopyright", COPYRIGHT_NOTE
VALUE "CompanyName", "My Company\0"
VALUE "FileVersion", STRFILEVER
VALUE "ProductName", STRPRODUCTNAME
VALUE "ProductVersion", STRPRODUCTVER
VALUE "InternalName", "program\0"
VALUE "OriginalFilename", "program.exe\0"
VALUE "Comments", "A comment to show\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0000, 0x04b0
END
END
When I display version info with PowerShell, like this:
(dir *.exe).VersionInfo|fl
empty "Comments" are displayed.
I also sigcheck program from SysInternals:
sigcheck -a .\program.exe
It displays:
...
Comments: n/a
...
"N/A" ? Does it mean I need to set some special flags, or something to get Comments shown?
To make it work I had to add /D _UNICODE /D UNICODE to resource compiler command line:
With such command line - Comments are there! Looks strange to me that it is required only for Comments, while other predefined fields do not require it. Anyway - thank you guys for hint - I had a look how VS does it.