Is this what you are needing?
Dim exefile As String = "C:\Program Files\Microsoft Office\Office\Winword.exe"
Dim fvi As FileVersionInfo = FileVersionInfo.GetVersionInfo(exefile)
Console.WriteLine("ProductName: {0}", fvi.ProductName)
Console.WriteLine("ProductVersion: {0}", fvi.ProductVersion)
Console.WriteLine("CompanyName: {0}", fvi.CompanyName)
Console.WriteLine("FileVersion: {0}", fvi.FileVersion)
Console.WriteLine("FileDescription: {0}", fvi.FileDescription)
Console.WriteLine("OriginalFilename: {0}", fvi.OriginalFilename)
Console.WriteLine("LegalCopyright: {0}", fvi.LegalCopyright)
Console.WriteLine("LegalTrademarks: {0}", fvi.LegalTrademarks)
Console.WriteLine("Comments: {0}", fvi.Comments)
Console.WriteLine("InternalName: {0}", fvi.InternalName)
Just replace WinWord.exe with the file you need the information on.
"Crouchie1998" wrote:
Use the FileInfo class
"Chris Braun" wrote:
Hi.
I need to retrieve the product version of a specific file from within my
VB.Net application so that I can determine if the application has the correct
version from a third party supplier.
I have done it in other languages just not .Net so I know it is possible.
But don't know how to do it in VB.Net.
Thanks In Advance,
Chris Braun