Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

FileVersionInfo.CompanyName Property

Gets the name of the company that produced the file.

[Visual Basic]
Public ReadOnly Property CompanyName As String
[C#]
public string CompanyName {get;}
[C++]
public: __property String* get_CompanyName();
[JScript]
public function get CompanyName() : String;

Property Value

The name of the company that produced the file.

Example

The following example calls GetVersionInfo to get the FileVersionInfo for the Notepad. Then it prints the CompanyName in a text box. This code assumes textBox1 has been instantiated.

[Visual Basic] 
Private Sub GetCompanyName()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
        FileVersionInfo.GetVersionInfo("%systemroot%\Notepad.exe")
    
    ' Print the company name.
    textBox1.Text = "The company name: " & myFileVersionInfo.CompanyName
End Sub 'GetCompanyName

[C#] 
private void GetCompanyName() {
    // Get the file version for the notepad.
    FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");
 
    // Print the company name.
    textBox1.Text = "The company name: " + myFileVersionInfo.CompanyName;
 }
    

[C++] 
private:
void GetCompanyName() {
    // Get the file version for the notepad.
    FileVersionInfo* myFileVersionInfo = FileVersionInfo::GetVersionInfo(S"%systemroot%\\Notepad.exe");
 
    // Print the company name.
    textBox1->Text = String::Format( S"The company name: {0}", myFileVersionInfo->CompanyName );
 }
    

[JScript] 
private function GetCompanyName() {
    //Get the file version for the notepad.
    var myFileVersionInfo : FileVersionInfo = FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");
 
    //Print the company name.
    textBox1.Text = "The company name: " + myFileVersionInfo.CompanyName;
 }
    

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

FileVersionInfo Class | FileVersionInfo Members | System.Diagnostics Namespace

Show:
© 2015 Microsoft