I need to get thefile version information for files.
I use the following code to get file version
But I got differenct FileVersion event if it show the same version in the file property.
FileVersionInfo info = FileVersionInfo.GetVersionInfo(args);
I copy the C:\windows\system32\notepad.exe then rename it as "notepad2.exe"
So the binary hash is the same. It also show the same verison in the file property.
But if I get FileVersion through FileVersionInfo .FileVersion
the orginal notepad.exe show "10.0.19041.2130 (WinBuild.160101.0800)"
the copy one show "10.0.19041.1865 (WinBuild.160101.0800)"
Do I call the wroing api to get file version?
What is the correct api I need to call to get the correct file version?