Demo on how to add version information to an executable:
include \masm32\MasmBasic\MasmBasic.inc ; download (http://masm32.com/board/index.php?topic=94.0)
Init
GetFileProps ; no args = current file; use e.g. GetFileProps (http://www.jj2007.eu/MasmBasicQuickReference.htm#Mb1367) "Explorer.exe" for others
For_ ecx=0 To FileProp$(?)-1
PrintLine At(30) FileProp$(ecx), Cr$, Str$("%_i ", ecx), FilePropName$(ecx)
Next
EndOfCode
To add the info itself, go to the end of the source, then click the RichMasm menu AutoCode/Version info, add the missing bits and pieces and hit F6 to build the exe (for a full list, see Version Information (https://docs.microsoft.com/en-gb/windows/win32/menurc/version-information?redirectedfrom=MSDN) at Microsoft). The resource section of the attached project looks as follows (as you can see, Unicode is allowed; some items like #D$, #Y$, #F$, #U$ get substituted at build time):
#include "resource.h"
IDI_APPLICATION ICON "\\Masm32\\MasmBasic\\icons\\Smiley.ico"
01 RT_MANIFEST "\\Masm32\\MasmBasic\\Res\\XpManifest.xml"
VS_VERSION_INFO VERSIONINFO
FILETYPE VFT_APP
FILEVERSION 1, 0, 0, 0
PRODUCTVERSION 1, 0, 0, 0
FILEOS VOS__WINDOWS32
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080904B0"
BEGIN
VALUE "Comments", "Вы можете использовать комментарии на русском или китайском"
VALUE "FileDescription", "Testing #F$"
VALUE "ProductName", "#U$'s Assembly Tools Collection"
VALUE "ProductVersion", "Release version #D$"
VALUE "CompanyName", "MasmBasic"
VALUE "FileVersion", "1.0"
VALUE "InternalName", "Внутреннее имя может быть свободно выбрано"
VALUE "LegalCopyright", "© #Y$ #U$@Masm32"
VALUE "PrivateBuild", "No, it's extremely public"
VALUE "OriginalFilename", "#F$"
VALUE "LegalTrademarks", "No trademarks found"
VALUE "SpecialBuild", "This build is for José Pascoa who loves MasmBasic"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x809, 0x4B0
END
END
The output of the exe looks like this:
0 Lang 080904B0
1 Comments Вы можете использовать комментарии на русском или китайском
2 InternalName Внутреннее имя может быть свободно выбрано
3 ProductName Jochen's Assembly Tools Collection
4 CompanyName MasmBasic
5 LegalCopyright © 2019 Jochen@Masm32
6 ProductVersion Release version 9 December 2019
7 FileDescription Testing FilePropsUtf8
8 LegalTrademarks No trademarks found
9 PrivateBuild No, it's extremely public
10 FileVersion 1.0
11 OriginalFilename FilePropsUtf8
12 SpecialBuild This build is for José Pascoa who loves MasmBasic
Of course, there are more complicated ways to add version info, see e.g. How do I set the version information for an existing .exe, .dll? (https://stackoverflow.com/questions/284258/how-do-i-set-the-version-information-for-an-existing-exe-dll) on SOF :biggrin: