In the tradition of mostly half-@§§edly put together batch scripts , here is one that should be able to provide dll version info and (hopefully) state to which OS it belongs
.
Of course it simply works for the simple chore that it works for .
Not a highly sophisticated detect engine tested for years on any possible .dll, only tested some 15 minutes on a few example ones .
dll_ver.g4b
!BAT # String is "FileV" in Unicode if "%1"=="" goto :usage set file=%~dpnx1 set string=\x01\x00\x46\x00\x69\x00\x6C\x00\x65\x00\x56\x00 set version= set char= debug off cat --hex --locate=%string% %file% > nul set /a offbase = %?% + 27 set /a counter=1 :loop set /a figure=0 set /a offset=%offbase%+%counter% cat --skip=%offset% --length=1 %file% | set char= :floop if "%char%"=="%figure%" set version=%version%%%char% set /a figure=%figure%+1 if "%figure%"=="10" goto :fnext goto :floop :fnext if "%char%"=="." set version=%version%%%char% set /a counter=%counter%+1 if "%counter%"=="30" goto :next goto :loop :next set majmin=%version:~0,3% set os=Unknown Operating System if "%majmin%"=="5.0" set os=Windows 2000 if "%majmin%"=="5.1" set os=Windows XP if "%majmin%"=="5.2" set os=Windows XP 64-bit or Server 2003 if "%majmin%"=="6.0" set os=Windows Vista or Server 2008 if "%majmin%"=="6.1" set os=Windows 7 or Server 2008 R2 if "%majmin%"=="6.2" set os=Windows 8 or Server 2012 echo File %file% echo appears being part of %os% set version goto :EOF :usage echo This batch should print the version of .dll's echo tested on 32-bit ONLY echo You must provide a fully qualified path as parameter. echo Example: echo (hd0,0)/Windows/System32/aaaamon.dll echo or a valid relative path from current ROOT: echo /Windows/System32/aaaamon.dll
Wonko