views:

33

answers:

1

I am using .NET Installer as a bootstrapper and I need to detect if Adobe Acrobat 9.3 or above is installed as a prerequisite.

Currently I am using this registry to detect the installation:

HKEY_CURRENT_USER\SOFTWARE\Adobe\Acrobat Reader\9.0\AdobeViewer\ELUA

I simply check to see if the key exists. This has the following problems:

  1. It depends on a registry path that will likely change with newer versions
  2. The ELUA key only exists after adobe reader is launched. If the install is run again before reader is ever launched it forces them to re-install
  3. This key does not allow me to really check what version of adobe they have.

FYI, .net Installer can check for existing products by file {exists / file version} or registry key {exists / version}. I prefer to use the registry as applications can be installed anywhere and I cannot scan the "Uninstall" registry keys using this tool.

Any ideas?

http://dotnetinstaller.codeplex.com/

A: 

Under the key

KEY_CURRENT_USER\SOFTWARE\Adobe\Acrobat Reader\9.0\Installer

you can find the install path. Once you have the install path, you can go there, find the executable "AcroRd32.exe" and get its version with the code

FileVersionInfo myFI = FileVersionInfo.GetVersionInfo("yourexe.exe");

As you said, never versions may have different registry keys. You will have to handle that in your code whereby you go through the keys under 'AcrobatReader', get their names, which may be '10.0' and '9.0', parse them, and then compare them to get the newest version info.

sbenderli
As mentioned in the question, this is not C# code, it's a declarative XML bootstrapper. This solution won't really work for that.
Nate Zaugg