检测是否 Adobe Acrobat 9.3+已经安装了
我使用 .NET Installer 作为引导程序,我需要检测 Adobe Acrobat 9.3 或更高版本是否安装为一个先决条件。
目前我正在使用此注册表来检测安装:
HKEY_CURRENT_USER\SOFTWARE\Adobe\Acrobat Reader\9.0\AdobeViewer\ELUA
我只需检查该密钥是否存在。这存在以下问题:
- 它取决于注册表路径,该路径可能会随较新版本而更改
- ELUA 密钥仅在启动 adobe reader 后才存在。如果在阅读器启动之前再次运行安装,则会强制他们重新安装
- 此密钥不允许我真正检查他们拥有的 adobe 版本。
仅供参考,.net 安装程序可以通过文件 {exists / file version} 或注册表项 {exists / version} 检查现有产品。我更喜欢使用注册表,因为应用程序可以安装在任何地方,并且我无法使用此工具扫描“卸载”注册表项。
有什么想法吗?
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:
- It depends on a registry path that will likely change with newer versions
- 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
- 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
键下,
在
KEY_CURRENT_USER\SOFTWARE\Adobe\Acrobat Reader\9.0\Installer
您可以找到安装路径。获得安装路径后,您可以转到那里,找到可执行文件“AcroRd32.exe”并使用代码
FileVersionInfo myFI = FileVersionInfo.GetVersionInfo("yourexe.exe");
获取 其版本也就是说,从来没有版本可能有不同的注册表项。您必须在代码中处理这个问题,通过“AcrobatReader”下的键,获取它们的名称(可能是“10.0”和“9.0”),解析它们,然后比较它们以获取最新版本信息。
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.