Setting application info in a Qt executable file on Windows

Here’s how I do it… add a file called resources.rc to your project with the contents: IDI_ICON1 ICON DISCARDABLE “res/app.ico” #include <windows.h> #include “version.h” VS_VERSION_INFO VERSIONINFO FILEVERSION VER_FILEVERSION PRODUCTVERSION VER_PRODUCTVERSION BEGIN BLOCK “StringFileInfo” BEGIN BLOCK “040904E4” BEGIN VALUE “CompanyName”, VER_COMPANYNAME_STR VALUE “FileDescription”, VER_FILEDESCRIPTION_STR VALUE “FileVersion”, VER_FILEVERSION_STR VALUE “InternalName”, VER_INTERNALNAME_STR VALUE “LegalCopyright”, VER_LEGALCOPYRIGHT_STR VALUE “LegalTrademarks1”, VER_LEGALTRADEMARKS1_STR … Read more

Get file version in PowerShell

Since PowerShell 5 in Windows 10, you can look at FileVersionRaw (or ProductVersionRaw) on the output of Get-Item or Get-ChildItem, like this: (Get-Item C:\Windows\System32\Lsasrv.dll).VersionInfo.FileVersionRaw It’s actually the same ScriptProperty from my Update-TypeData in the original answer below, but built-in now. In PowerShell 4, you could get the FileVersionInfo from Get-Item or Get-ChildItem, but it would … Read more