Determining the version of Adobe Reader using vba

Posted on 2013-10-07
Medium Priority
Last Modified: 2013-10-08
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")
Question by:dsoderstrom
  • 5
  • 3
LVL 86
ID: 39552815
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

Author Comment

ID: 39553304
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?
LVL 86
ID: 39553417
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)
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.


Author Comment

ID: 39553472
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.

Author Comment

ID: 39553523
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?

Author Comment

ID: 39553586
Never mind the question regarding what HKCU is.  I understand what that is now.
LVL 86

Accepted Solution

Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 total points
ID: 39554008
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

Author Closing Comment

ID: 39556911
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.

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question