Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check for Adobe Acrobat

Status
Not open for further replies.

asirjs

Programmer
Joined
Jun 2, 2004
Messages
2
Location
US
I have an Access application that accesses PDF files. This program is used on a network. I need to check to see if the user has Adobe Acrobat installed on their computer, and ultimately get the path to the .exe file that runs acrobat. If Acrobat is not installed, I can give the link to install it. Any ideas?
 
well assuming that adobe is installed in its default location (i would imagine that it will be most of the time)
then use the following to see if the .exe file exists in adobes defaultinstall location

Sub FileExists()
Dim fso
Dim file As String
file = "C:\whatever\default\install\path\is.exe"
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists(file) Then
MsgBox "Adobe has been located"

Else
MsgBox "You must install adobe acrobat to continue",vbcritical + vbokonly,"Adobe could not be located"


End If
End Sub
 
Thanks for your help
 
asirjs,

You could also try to instatiante an instance of Acrobat (Reader?) and trap the error.

Craig
 
I need to check to see if the user has Adobe Acrobat installed on their computer, and ultimately get the path to the .exe file that runs acrobat
Try something like this (works on any windows version, language(locale) independant):
Set sh=CreateObject("WScript.Shell")
On Error Resume Next
exepath = sh.RegRead("HKCR\Software\Adobe\Acrobat\Exe\")
exename = Dir(exepath)
If Err.Number <> 0 Or exename = "" Then
MsgBox "Please install Acrobat Reader"
End If

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top