Yes, we are doing it in a separate application. While invoking our main application we query if there is any Adobe Acrobat installed in the machine, if so we query the version for our usage. If it doesnt matches our requirement we exit our main application with an erro message to have the required version to be installed.
thanks and regards
i was also thinking in the same line !!!
But figuring out something small as the version from the registry takes me to iterate through a set of registry path is a cumbersome but i had to live with it as adobe doesnt provide me with any other choice.
But it should be as simple as a key in the registry to query to get the values for something like a version. But the keys which i mentioned in the first mail has the info but i guess because of the BUG (i presume to be so) i cannot rely on it. :-(
Why are you querying the registered OLE interfaces for the application version number? They are distinct and completely the wrong place to query for version.
VersionMax = 0x00090001
VersionMin = 0x00020000
That would be Acrobat 9.1.2
Where X is the major version (i.e. 7, 8, 9). There may be more than 1 major version tree used for compatibility with add-on and legacy applications (even if you installed on a clean machine - this is not a bug it is intended behaviour) but only the currently installed version will have sub-keys under the Installer key.
We are using it to query the version of the installed Adobe Acrobat in the machine in which our application is installed. If it doesnt matches our criteria, we ask the user to have the correct version to be installed.
We queried the OLE interface for the Acrobat Version because at a time you are suppose to have one installation of the Adobe Acrobat. And morevoer the OLE reg path is giving the 'Acrobat Version'. For AA8.X both the OLE registry keys were having the same version number i.e 8.0.
Yes, i guessed that the reason for multiple versions under the [HKLM\SOFTWARE\Adobe\Adobe Acrobat\X.0\Installer] may be for some backward compatibility. Anycase, i have already gone with the HKLM...\X.0\Installer path way.
But why is that the OLE interfaces in the registry shows two different 'Acrobat Version' for the AA9.??
thanks and regards
Attached VBS will do what you want.
Your info, you get from Windows: FileSystemObject
The RegRead command is only to get the path of the executable.
In an advanced programming you can replace this command with an API call: FindExecuteable
Set WshShell = CreateObject("WScript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
' // Get the path
Path = WshShell.Regread("HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\Acrobat.EXE\Path")
Path = Path &"\"& "Acrobat.exe"
' //Get the version