I need a command line tool to dump standard Windows DLL version info so I can process it by means of a bash script (Cygwin).
As a Java developer I am not very used to Microsoft development tools (though I have a little bit of experience with Microsoft Visual Embedded C++ 4.0 and Microsoft Visual Basic 6.0).
The appropriate tool seems to be mt.exe, as stated on SO. However the only chance I have found to get this little application is to download a 1.29 GB ISO of the Windows SDK for Windows Server 2008 and .NET Framework. I can not believe this is the only way to do it.
I have also found a little application on the Internet called PEView, but it displays too much (and useless in my case) information and it is not a command line application.
Standard objdump bundled inside Cygwin can also dump some information about the DLL files, but I can not see the option to dump DLL version. Note that MajorImageVersion, MinorImageVersion and other fields dumped by this tool (with -p option) are not related to own DLL version.
Any alternatives about what to do? Maybe I missed some important objdump option? Is mt.exe my only choice? If this is the case, is it possible to get it separately from Windows SDK?
and one way with
makecab
:example output (it has a string version which is a small addition to wmic method :) ):
and one more Using shell.application and hybrid batch\jscript.Here's tooptipInfo.bat :
used against cmd.exe :
There is an command line application called "ShowVer" at CodeProject:
ShowVer.exe command-line VERSIONINFO display program
As usual the application comes with an exe and the source code (VisualC++ 6).
Out outputs all the meta data available:
On a German Win7 system the output for user32.dll is like this:
Use Microsoft Sysinternals Sigcheck. This sample outputs just the version:
Unpacked sigcheck.exe is only 228 KB.
You can write a VBScript script to get the file version info:
VersionInfo.vbs
You can call this from the command line like this:
You can use PowerShell to get the information you want.
By default this will display ProductVersion and FileVersion But the full VERSIONINFO is available. I.e. to return Comments