Skip to main content

How do I construct a Resources .rc (or otherwise) file to add to a Visual COBOL project to populate the Details tab on a .EXE/.DLL Properties?

I would like to be able specify Copyright, Product name, Product version, and File description.

I have created a .rc file that contains:

1 VERSIONINFO
  FILEVERSION    1,2,3,4
  PRODUCTVERSION 5,6,7,8
  FILEFLAGS      0
BEGIN
  BLOCK "StringFileInfo"
  BEGIN
    BLOCK "04090000"            /* lang-charset : US. English, ACSII */
    BEGIN
      VALUE "CompanyName",      "Company Name\\0"
      VALUE "FileVersion",      "9.10.11.12\\0"
      VALUE "LegalCopyright",   "Copyright (C) 2025\\0"
      VALUE "ProductName",      "Product name\\0"
      VALUE "ProductVersion",   "13.14.15.16\\0"
    END
  END
END

But the only property that gets used is the initial FILEVERSION (1,2,3,4).

How do I get the other values into the EXE/DLL Properties?



------------------------------
Nick Kaye
Rocket Software Forum Member
------------------------------

How do I construct a Resources .rc (or otherwise) file to add to a Visual COBOL project to populate the Details tab on a .EXE/.DLL Properties?

I would like to be able specify Copyright, Product name, Product version, and File description.

I have created a .rc file that contains:

1 VERSIONINFO
  FILEVERSION    1,2,3,4
  PRODUCTVERSION 5,6,7,8
  FILEFLAGS      0
BEGIN
  BLOCK "StringFileInfo"
  BEGIN
    BLOCK "04090000"            /* lang-charset : US. English, ACSII */
    BEGIN
      VALUE "CompanyName",      "Company Name\\0"
      VALUE "FileVersion",      "9.10.11.12\\0"
      VALUE "LegalCopyright",   "Copyright (C) 2025\\0"
      VALUE "ProductName",      "Product name\\0"
      VALUE "ProductVersion",   "13.14.15.16\\0"
    END
  END
END

But the only property that gets used is the initial FILEVERSION (1,2,3,4).

How do I get the other values into the EXE/DLL Properties?



------------------------------
Nick Kaye
Rocket Software Forum Member
------------------------------

Hello Nick,

The following worked for me:

1 VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEFLAGSMASK 0x3F
FILEFLAGS 0x0
FILEOS 0x40004
FILETYPE 0x1
FILESUBTYPE 0x0

BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904E4"
        BEGIN
            VALUE "CompanyName", "Rocket Software Support"
            VALUE "FileDescription", "EXE/DLL File Info"
            VALUE "FileVersion", "1.0.0.0"
            VALUE "OriginalFilename", "EXEDLLfileinfo.exe"
            VALUE "ProductName", "Test Program"
            VALUE "ProductVersion", "7.8.9.0"
            VALUE "LegalCopyright", "(C) 2025 RS Support"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x0409, 1252
    END
END


------------------------------
Fano R.
Developer/Engineer
Rocket Forum Shared Account
------------------------------

Hello Nick,

The following worked for me:

1 VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEFLAGSMASK 0x3F
FILEFLAGS 0x0
FILEOS 0x40004
FILETYPE 0x1
FILESUBTYPE 0x0

BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904E4"
        BEGIN
            VALUE "CompanyName", "Rocket Software Support"
            VALUE "FileDescription", "EXE/DLL File Info"
            VALUE "FileVersion", "1.0.0.0"
            VALUE "OriginalFilename", "EXEDLLfileinfo.exe"
            VALUE "ProductName", "Test Program"
            VALUE "ProductVersion", "7.8.9.0"
            VALUE "LegalCopyright", "(C) 2025 RS Support"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x0409, 1252
    END
END


------------------------------
Fano R.
Developer/Engineer
Rocket Forum Shared Account
------------------------------
Thanks!
That almost worked.
We can’t see Company Name in the properties, but I think we can live with that unless there is an easy fix.

Thanks,

Nick

Thanks!
That almost worked.
We can’t see Company Name in the properties, but I think we can live with that unless there is an easy fix.

Thanks,

Nick

I don't know why the Company Name property is not shown up.

I looked at .EXE files from other vendors, and the Company Name property is missing from all of them. However, I noticed they included their company name in either or both File Description and Product Name.



------------------------------
Fano R.
Developer/Engineer
Rocket Forum Shared Account
------------------------------

I don't know why the Company Name property is not shown up.

I looked at .EXE files from other vendors, and the Company Name property is missing from all of them. However, I noticed they included their company name in either or both File Description and Product Name.



------------------------------
Fano R.
Developer/Engineer
Rocket Forum Shared Account
------------------------------
Typically, we include company name in our Copyright Notice so we can live with that.
Thanks for your help.