3 Replies Latest reply on Nov 13, 2014 11:44 AM by puterguy01

    Check version of Adobe Reader using script

      Is there a way to check the version of Adobe Reader using a batch script on Windows XP (registry entry preferably)?  I would like a way to to tell if version 9.1 is installed on a machine, so the script won't install it if it is already installed.

       

      Version 9.0 is installed on most machines, as well as Acrobat 7 on some machines and I would like to upgrade them using a login script.

       

      Thanks

        • 1. Re: Check version of Adobe Reader using script
          Level 1

          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

          )

          • 2. Re: Check version of Adobe Reader using script
            MikeAtWick

            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:

             

            @echo off
            cls
            rem Installing an update which results in Adobe Reader 9.1.3
            echo.
            echo.
            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
            goto wrongversion
            :testedtrue
            net use q: \\myserver\software$\acrobat_reader\reader913 /persistent:no
            ping localhost -n 5 > nul
            q:
            msiexec /quiet /update adberdrupd913_all_incr.msp > logs\%computername%_acrobat_reader_913.txt
            ping localhost -n 10 > nul
            goto gotit
            :gotit
            :wrongversion
            exit

             

            Thanks again!

             

            -Mike

            • 3. Re: Check version of Adobe Reader using script
              puterguy01

              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.