Found a way now.
For anyone's reference I think something the following should work, it uses the windows uninstall list to check if 9.1.0 is installed.
Reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" /s | find "DisplayName" | find "Adobe Reader 9.1" >NUL
IF %ERRORLEVEL% == 0 (
REM Install Adobe Reader 9.1 here
AdbeRdr910_en_US.exe /sAll /rs /l REM Change for whatever you want to install
Thank you Allistairr very much for your insight. I just used it to check for 9.1.2 so that I could apply the 9.1.3 update using a batch file.
In case it will help anyone else I'm adding the content of my batch file here:
rem Installing an update which results in Adobe Reader 9.1.3
echo Installing Acrobat Reader 9.1.3 update... please wait...
if exist \\myserver\software$\acrobat_reader\reader913\logs\%computername%_acrobat_reader_913.txt goto gotit
rem Find generates an errorlevel of zero if it encounters a match.
Reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" /s | find "DisplayName" | find "Adobe Reader 9.1.2"
if %errorlevel%==0 goto testedtrue
net use q: \\myserver\software$\acrobat_reader\reader913 /persistent:no
ping localhost -n 5 > nul
msiexec /quiet /update adberdrupd913_all_incr.msp > logs\%computername%_acrobat_reader_913.txt
ping localhost -n 10 > nul
Bless you, Allistairr. I've been striving for months to figure out how to extract the versions of installed programs via the registry's Uninstall folder. Seriously, you've just made my whole week and fixed about 50 lines of code I've been bashing my head against.