bgmCoder bgmCoder - 4 months ago 13x Question

How to Get Version of an Executable file?

Salvete! I am writing a program to update the readme files for my applications. I want to extract the version number from other compiled applications. I want to read the version number from the executable, not from its uncompiled resources.

How can I do this in without using an external tool like reshacker?

(I found this link, but it is for another language.)


You can use a function like this to do it:

Private Function GetFileVersionInfo(ByVal filename As String) As Version
    Return Version.Parse(FileVersionInfo.GetVersionInfo(filename).FileVersion)
End Function