1
我需要知道是否已经安装了一个特定的应用程序。我正在开发Windows Phone 8.0应用程序。我试图通过在注册表中搜索要做到这一点,但有没有发现Registry
类:如何在设备上找到特定的已安装应用程序?
key = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall");
foreach (String keyName in key.GetSubKeyNames())
{
RegistryKey subkey = key.OpenSubKey(keyName);
displayName = subkey.GetValue("DisplayName") as string;
if (p_name.Equals(displayName, StringComparison.OrdinalIgnoreCase) == true)
{
return true;
}
}