zee*_*zee 0 c# x86 adobe version anycpu
简单的代码我有小问题.此代码在"x86"模式下正常工作,但在"任何CPU"模式下无法正常工作,也许可以在"x86"上运行一个类,在"任何CPU"模式下运行另一个类?码:
namespace Software_Info_v1._0
{
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Win32;
public class Adobe
{
public string GetAdobeVersion()
{
try
{
RegistryKey adobe = Registry.LocalMachine.OpenSubKey("Software").OpenSubKey("Adobe");
if (adobe != null)
{
RegistryKey acroRead = adobe.OpenSubKey("Acrobat Reader");
if (acroRead != null)
{
string[] acroReadVersions = acroRead.GetSubKeyNames();
foreach (string versionNumber in acroReadVersions)
{
Console.WriteLine("Acrobat Reader version: " + versionNumber);
}
}
}
}
catch
{
}
return null;
}
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2975 次 |
| 最近记录: |