Click here to Skip to main content
15,860,972 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I used Visual Studio 2017 enterprise AppWizard to wrap up a SDI application quickly.
I compiled it successfully and it runs well.

but if I look at the attributes of this executable file by right clicking it->Property->select details tab, I can not see CompanyName attribute displayed. not sure if it is by design.

how can I display Company Name in my executable file property?

Thanks a million!

What I have tried:

here is VS_VERSION_INFO defined in resource file:

C++
VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,0,1
 PRODUCTVERSION 1,0,0,1
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x40004L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904b0"
        BEGIN
            VALUE "CompanyName", "TODO: <Company name>"
            VALUE "FileDescription", "MFCApplication1"
            VALUE "FileVersion", "1.0.0.1"
            VALUE "InternalName", "MFCApplication1.exe"
            VALUE "LegalCopyright", "TODO: (c) <Company name>.  All rights reserved."
            VALUE "OriginalFilename", "MFCApplication1.exe"
            VALUE "ProductName", "TODO: <Product name>"
            VALUE "ProductVersion", "1.0.0.1"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1200
    END
END
Posted
Updated 15-Aug-20 22:51pm
v2
Comments
Rick York 15-Aug-20 22:28pm    
Here's what one from a program of mine looks like :

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904e4"
BEGIN
VALUE "CompanyName", "RBS, Limited"
VALUE "FileDescription", "Test Backup"
VALUE "ProcessFiles", "1.0.0.1"
VALUE "InternalName", "TestBackup"
VALUE "LegalCopyright", "(c) RBS, Limited. All rights reserved."
VALUE "OriginalFilename", "TestBackup.exe"
VALUE "ProductName", "Test Backup"
VALUE "ProductVersion", "1.0.0.1"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END

The resource file also has this :

LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

1252 is the code page setting. The company name (mine) is visible in the explorer. My installation is an American English one. The language settings might have something to do with it.
KarstenK 16-Aug-20 3:44am    
@ Rick: post answers as answers to close the Q&A.
Rick York 16-Aug-20 11:30am    
That was not an answer. It was an observation.

1 solution

This is a Windows issue, not Visual Studio. I have just tested and Windows only displays the properties that you see, although there may be many others in the Version table. I confirmed the presence of the other properties by a program I have which lists all resources in an executable.
 
Share this answer
 
Comments
KarstenK 16-Aug-20 13:12pm    
often a problem of some bit flags like in "Translation".
Richard MacCutchan 16-Aug-20 13:20pm    
Quite possibly. I have never found any list that explains which values the properties tab will display.
Rick York 17-Aug-20 2:10am    
From the version info in my comment above, the details page of the properties sheet shows these items :

FILEVERSION 1,0,0,1
VALUE "CompanyName", "Company Name"
VALUE "FileDescription", "File Description"
VALUE "LegalCopyright", "Legal Copyright"
VALUE "ProductName", "Product Name"
VALUE "ProductVersion", "Product Version"
VALUE "OriginalFilename", "Original Filename"

along with the language from the "Translation" field.
Richard MacCutchan 17-Aug-20 3:44am    
I have looked at a number of executables, including Microsoft's own products, and none of them show the CompanyName field. Are you using something other than Windows Explorer to view them?
Richard MacCutchan 17-Aug-20 4:08am    
I just created a simple application and added the resource details from your sample above (exactly as you show them). When I displayed them in the properties dialog this is what I got:
FileDescription	Test Backup
Type		Application
File version	1.0.0.1
ProductName	Test Backup
ProductVersion	1.0.0.1
Copyright	(c) RBS, Limited.  All rights reserved.
Size		56.0 KB
Date modified	17/08/2020 08:55
Language	English (United States)
OriginalFilename	TestBackup.exe

So maybe it is a Windows version thing; I am on Windows 10.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900