How do I retrieve the version of a file from a batch file on Windows Vista?
and three ways without external tools 1.WMIC WMIC DATAFILE WHERE name=”C:\\install.exe” get Version /format:Textvaluelist Pay attention to the double slashes of file name. Ready to use script: @echo off :wmicVersion pathToBinary [variableToSaveTo] setlocal set “item=%~1” set “item=%item:\=\\%” for /f “usebackq delims=” %%a in (`”WMIC DATAFILE WHERE name=”%item%” get Version /format:Textvaluelist”`) do ( for /f “delims=” … Read more