Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get the file version of a dll or exe [duplicate]

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?

like image 982
Calumet Avatar asked Jul 14 '11 18:07

Calumet


People also ask

How do I programmatically get the version of a DLL or EXE file?

You would use the GetFileVersionInfo API.

How do I find the DLL version?

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.


1 Answers

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
like image 104
Dave Avatar answered Sep 28 '22 05:09

Dave