Hello, everyone. I hope you are having a nice weekend! :)
I'm trying to check to see if Windows XP PCs have Acrobat
Reader installed on a button that launches a PDF file. This is what
set Acrobat = baFindApp( "pdf" )
if Acrobat = "" then
Alert "You will need to install Adobe Acrobat Reader to view
the PDF documents properly."
This launches the PDF on Windows if Acrobat is installed
without errors, but when I uninstall Reader and click on the
button, nothing happens. I don't get the alert and I don't get the
This script actually gives me the alert on the Mac, but it's
1) Check to see what the response is from your baFindApp()
should return the path to the executable. You can then use
baFileExists() to see if the program is really there. If the
that Acrobat Reader was installed then uninstalled, it may
have left the
registry info, so baFindApp thinks it is still installed.
2) Check the response of baOpenFile(). It may give an error
you can use to send an error alert to the user.
It's not clear if you uninstalled Reader and then rebooted...
this might give a false positive... also, the notes for the docs
strongly suggest that baFindApp() looks for the registration of the
file extension which would be located in the registry...
... an interesting note: if Adobe Acrobat and Reader are both
installed, for instance, then the baFindApp() call will return
Acrobat.exe as the application (on my system, anyways) -
technically, Acrobat, Reader and GoLive have all registered .pdf on
my machine, but the registry lists entries alphabetically so
Acrobat gets the recognition, so-to-speak.
It would appear that baFindApp() has a flaw if two or more
applications have registered the same extension.