Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
am working on a auto updater, and the updater will check the version of 3 files. How can i read the file version ???

Thanks!
Posted

1 solution

We can't answer that.

We have no idea what the files are, what they contain, how they store version info, or even if they do contain version information!

If you created the files, then you know how they store it.
If you didn't, then you need to look at the file format specification.


"Dll files and EXE file. the dll file written by the exe file."


Try:
C#
string fileVersion = FileVersionInfo.GetVersionInfo(file).FileVersion;
string productVersion = FileVersionInfo.GetVersionInfo(file).ProductVersion;



"is it VB 2008"

No. :O
But the conversion is pretty simple!
Try:
VB
Dim fileVersion As String = FileVersionInfo.GetVersionInfo(file).FileVersion
Dim productVersion As String = FileVersionInfo.GetVersionInfo(file).ProductVersion
 
Share this answer
 
v3
Comments
MoDy kareem 18-Mar-12 7:24am    
Dll files and EXE file. the dll file written by the exe file.
OriginalGriff 18-Mar-12 7:45am    
Answer updated
MoDy kareem 18-Mar-12 7:52am    
is it VB 2008 ??
OriginalGriff 18-Mar-12 8:07am    
Answer updated
MoDy kareem 8-Apr-12 17:12pm    
How to use it? And can i write a dll with version ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900