# Solved: Adobe batch help



## raven6988 (Feb 4, 2010)

Hello again,
Yes I am back with yet again another problem. I have been tweaking my scripts and have a decent ground zero to start from but what is irratating me is this stupid Adobe reader portion. The way it is written will work for now but as new versions come out I do not want to keep having to add to it.

What I am trying to do is display the version of Adobe that is currently installed. Mine works but I was wondering if there was a better way to look for it. I have been unable to locate like I did with Java, using a FOR command to display the versions. Hopefully there is something out there that I am missing because I am at a lose.

Thanks in advance for the help, again.

Here is my code:

REG Query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\{AC76BA86-7AD7-1033-7B44-A93000000001} /v DisplayName >nul 2>&1
If %errorlevel%==0 echo . == Adobe Reader ver 9.3 is installed. ==
If %errorlevel%==1 echo . == + ==

REG Query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\{AC76BA86-7AD7-1033-7B44-A92000000001} /v DisplayName >nul 2>&1
If %errorlevel%==0 echo . == Adobe Reader ver 9.2 is installed. ==
If %errorlevel%==1 echo . == + ==

REG Query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\{AC76BA86-7AD7-1033-7B44-A91000000001} /v DisplayName >nul 2>&1
If %errorlevel%==0 echo . == Adobe Reader ver 9.1 is installed. ==
If %errorlevel%==1 echo . == + ==

REG Query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\{AC76BA86-7AD7-1033-7B44-A80000000002} /v DisplayName >nul 2>&1
If %errorlevel%==0 echo . == Adobe Reader ver 8.0.2 is installed. ==
If %errorlevel%==1 echo . == + ==


----------



## TheOutcaste (Aug 8, 2007)

The above will only find the versions you check for. It won't find Version 6.0.1 if installed for example.
The *DisplayVersion* value might work, but version 6 is an odd one; it's set to 006.000.001. All other versions I have the DisplayVersion is just the number with no leading zeros

The Version number does seem to be a part of the Display name field though.
Other versions:

```
DisplayName        [COLOR=Red]DisplayVersion[/COLOR] Uninstall Key Name:
Adobe Acrobat 4.0  [COLOR=Red]4.0[/COLOR]            Adobe Acrobat 4.0
Version 4.0.5 shows same as above
Adobe Acrobat 5.0  [COLOR=Red]5.0[/COLOR]            Adobe Acrobat 5.0
Version 5.0.5 shows same as above
Adobe Acrobat 5.0  [COLOR=Red]5.1[/COLOR]            Adobe Acrobat 5.0
Adobe Reader 6.0.1 [COLOR=Red]006.000.001[/COLOR]    {AC76BA86-7AD7-1033-7B44-A00000000001}
Adobe Reader 7.0   [COLOR=Red]7.0.0[/COLOR]          {AC76BA86-7AD7-1033-7B44-A70000000000}
Adobe Reader 7.0.9 [COLOR=Red]7.0.9[/COLOR]          {AC76BA86-7AD7-1033-7B44-A70900000002}
Adobe Reader 8     [COLOR=Red]8.0[/COLOR]            {AC76BA86-7AD7-1033-7B44-A80000000002}
Adobe Reader 8.1.3 [COLOR=Red]8.1.3[/COLOR]          {AC76BA86-7AD7-1033-7B44-A81300000003}
Adobe Reader 9.1.3 [COLOR=Red]9.1.3[/COLOR]          {AC76BA86-7AD7-1033-7B44-A91000000001}
Adobe Reader 9.3.1 [COLOR=Red]9.3.1[/COLOR]          {AC76BA86-7AD7-1033-7B44-A93000000001}
```
I would just use a For loop to find the Adobe keys, which always start with *{AC76BA86-7AD7-1033-7B44-* or *Adobe Acrobat*, then read the *DisplayName* and parse the version from that. Or just display the *DisplayName*.

```
Set _AdbVer=
For /F "Tokens=*" %%I In ('Reg Query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall^|Findstr /I /C:"{AC76BA86-7AD7-1033-7B44-" /C:"Adobe Acrobat"') Do (
  For /F "Tokens=4*" %%J In ('Reg Query "%%I" /V DisplayName') Do Set _AdbVer=%%K
)
If Not Defined _AdbVer (
  Echo.Adobe Reader is not installed
) Else (
  Echo.Adobe Reader version %_AdbVer% is installed
)
```
If you don't need the word version between Adobe Reader and the version number, just display the DisplayName:

```
Set _AdbVer=
For /F "Tokens=*" %%I In ('Reg Query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall^|Findstr /I /C:"{AC76BA86-7AD7-1033-7B44-" /C:"Adobe Acrobat"') Do (
  For /F "Tokens=2*" %%J In ('Reg Query "%%I" /V DisplayName') Do Set _AdbVer=%%K
)
If Not Defined _AdbVer (
  Echo.Adobe Reader is not installed
) Else (
  Echo.%_AdbVer% is installed
)
```
Or you can read the *DisplayVersion* value in this last one and echo *Adobe Reader ver %_AdbVer% is installed*, but Version 6 will have the leading zeros


----------



## raven6988 (Feb 4, 2010)

Thank you. That worked perfectly. Appreciate the help.


----------

