Using: Visual Basic .NET 2012
Problem: I am using the code below to get the version information from a system dll. It returns a version number and I check the file manually by going to C:\windows\system32, right clicking, going to properties, clicking on Details and the version number that VB.NET returned to me is not the one shown here. What is up?
Dim dnsFile = Environment.GetFolderPath(Environment.SpecialFolder.System) + "\dnsapi.dll"
Dim myFileVersionInfo As FileVersionInfo
If File.Exists(dnsFile) Then
myFileVersionInfo = FileVersionInfo.GetVersionInfo(dnsFile)
FileVersion = (myFileVersionInfo.FileVersion.Split(" ")(0)).ToString
End If
MsgBox(FileVersion)
Does anyone know why this is going on? I need to retrieve the version number shown to me in the Properties menu.