|Hi, can anyone tell me how I can get the version of an executable programmatically. It can be a WSH script or a Win32 API executable, as long as I can access it in a batch file, for example like this:|
for /f "delims=" %%a in ('getversion "%SystemRoot%\System32\reg.exe"') do set v=%%a
After that, I can check if %v% starts with "5.1" or "6.0" or "6.1".
I ask because I want to parse the output of a REG QUERY command in a batch file. Unfortunately, the output format differs with different versions of REG.EXE.