Determining the version of Adobe Reader using vba

Is there a way to determine the version of Adobe Reader installed on a computer using vba? Specifically, what i want to end up with is the path to file AcroRd32.exe (ex. "C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe")
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You could search the Registry. I believe those would be located here:

HKCU\Software\Adobe\Acrobat Reader

And each version of the Reader would be in a subkey specified by the Version:

HKCU\Software\Adobe\Acrobat Reader\11
HKCU\Software\Adobe\Acrobat Reader\10
etc etc

I only have 11 on my machine, but under that key is a value named InstallPath, which shows the full path to the AcroRd32.exe file.

This question:

Includes a Registry module I've used for doing this. Basically you'd copy the code you find in comment http://#a17408566 to a new Standard Module, and then use that to read the registry. For example to use it to read the reg key above:

Dim s As String
s = RegRead("SOFTWARE\Adobe\Acrobat Reader\8\", "InstallPath", HKCU)

If Len(s) > 0 then
  '/ the variable s contains the path, so build it up with the file name:
  s = s & "\AcoRd32.exe"
End If
dsoderstromAuthor Commented:
Thank you for your reply.

I did copy your module for reading the registry into my database but the following line returns a zero length string

s = RegRead("SOFTWARE\Adobe\Acrobat Reader\8\", "InstallPath", HKCU)

Looking at the registry on the computer I am using for testing this I do have a path of:

HKEY_CURRENT USER\Software\Adobe\Acrobat Reader\8.0\InstallPath

did i miss something here?
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
I wasn't sure of the Version format. It's "8.0", not "8", so your RegRead should look like this:

s = RegRead("SOFTWARE\Adobe\Acrobat Reader\8.0\", "InstallPath", HKCU)
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

dsoderstromAuthor Commented:
Yep, actually I tried that but it still returns a zero length string.
I've run debug just to make sure it calls the function.  It steps through the function without erroring out but variable s still comes back as a zero length string.
dsoderstromAuthor Commented:
I guess one thing I don't understand is the third parameter being passed to the function Regread (HKCU).  When I look at the value of this while running debug it is -2147483647.  Where is that coming from?
dsoderstromAuthor Commented:
Never mind the question regarding what HKCU is.  I understand what that is now.
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Make sure the path to the Registry key is exactly correct:

SOFTWARE\Adobe\Acrobat Reader\8.0\

Note you may need to leave off the trailing backslash

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dsoderstromAuthor Commented:
I could not get your module to return anything but a zero-length string so had to go in another direction.  For now I am just going to run the following line which will return the reader folder name of the reader version that is installed.  For example, on my computer it returns "reader 8.0".  Once I have that I can build the complete path to the acrord32.exe file.  Not as elegant as your solution but it works.

 iselecfile = Dir("c:\program files\adobe\reader*", vbDirectory)

Thank you very much for your time and help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.