2

嗨,我想知道在我开始打开应用程序(Acrobat Reader)之前是否存在检查应用程序(Acrobat Reader)是否存在于本地计算机中的现有实现。

例如,我想打开一个 pdf 文件,但我没有 acrobat 阅读器,那么我将如何检查是否有安装程序供我打开文件?.

System.Diagnostics.Process.Start("path.pdf")
4

4 回答 4

3

您可能想查看Windows:列出和启动与扩展和 IQueryAssociations 关联的应用程序。

于 2010-04-07T09:38:17.283 回答
2

以编程方式,这是您检查 Acrobat Reader 是否存在的方法

如果您安装了 acrobat reader,您也可以手动检查;这里的某个地方 YourInstallationDrive:\Program Files\Adobe\Reader 8.0\Reader

然后您可以打开 PDF,如下所示:

Process.Start("AcroRd32.exe", "c:\myfile.pdf");
于 2010-04-07T10:12:20.063 回答
1

您可以检查此注册表项以获取已安装的应用程序 HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall

请参阅以下文章

于 2010-04-07T10:16:09.743 回答
0

采用System.IO.File.Exists("Your Path")

于 2010-04-07T09:20:18.890 回答