Possible Duplicates:
Command line tool to dump Windows DLL version?
How do I retrieve the version of a file from a batch file on Windows Vista?
Is it possible to get the file version of a dll or exe file using batch commands and store it in a variable?
You would use the GetFileVersionInfo API.
If you reference the dll in Visual Studio right click it (in ProjectName/References folder) and select "Properties" you have "Version" and "Runtime Version" there. In File Explorer when you right click the dll file and select properties there is a "File Version" and "Product Version" there.
Here's an example using sigcheck:
@ECHO OFF
FOR /F "tokens=1-3" %%i IN ('p:\supporttools\sigcheck.exe p:\supporttools\procmon.exe') DO ( IF "%%i %%j"=="File version:" SET filever=%%k )
ECHO The version of the file is %filever%
PAUSE
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With