【发布时间】:2011-07-01 03:29:00
【问题描述】:
我的经理询问了包含 PDF 文件的自动播放 cd 并检查用户 pc 上是否安装了 adobe acrobat 是否安装了消息 apear 从 cd 安装此程序 我有 windows 应用程序来检查是否是 adob reader 或 acrobat是否安装在 pc 中我做得很好,但我想如果没有安装这个程序,acrobat reader 安装程序会从 cd 和用户安装这个程序。
public Form1()
{
RegistryKey adobe = Registry.LocalMachine.OpenSubKey("Software").OpenSubKey("Adobe");
if (adobe != null)
{
RegistryKey acroRead = adobe.OpenSubKey("Acrobat Reader");
if (acroRead != null)
{
string[] acroReadVersions = acroRead.GetSubKeyNames();
MessageBox.Show("The following version(s) of Acrobat Reader are installed: ");
foreach (string versionNumber in acroReadVersions)
{
MessageBox.Show(versionNumber);
}
}
}
else
{
MessageBox.Show("The following version(s) of Acrobat Reader arenot installed: ");
}
【问题讨论】: