1 Reply Latest reply on Mar 20, 2009 3:44 PM by (Genie75)

    Detect Adobe Reader Version in Dos Script

      Has anyone found an easy way to find the version of c:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe? The reason I need this is so that I don't run AdbeRdr910_en_US_std.exe again if they already have it. Unfortunately, AdbeRdr910_en_US_std.exe will run even if it is already installed. And it will pop up a window asking the user if they want to repair, etc. We don't want that window to pop up for users that already have the correct version, as our HelpDesk will get a lot of calls as to what to do.
      So, I have a script which does successfully get the version. Then the script sets the version in a file. And then the DOS script grabs the value from the file, and sets it in a variable. Unfortunately, the value of the variable is not sticking, so it executes incorrectly.
      How is everyone else figuring out the version of Adobe reader via a script? Any suggestions?
      Below is what the script looks like:

      if exist "c:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe" (
      rem Make sure Reader version is < 9.1

      rem Get flag from file that indicates if it is less than 9.1
      WScript "f:\win95app\updates\nt\get_ver.wsh"

      If not exist c:\temp\adobe_ver.txt goto end

      rem When I echo the value of %%i, the value is correct
      rem For /F "tokens=1*" %%i in (c:\temp\adobe_ver.txt) do echo "%%i"
      For /F "tokens=1*" %%i in (c:\temp\adobe_ver.txt) do set adobe_flag="%i"
      rem When i echo the value of the variable, it is set to the
      rem previous
      rem value last time the script was run. Not the current time. Even
      rem though %%i is correct.
      echo Flag is "%adobe_flag%"