如何在设备上找到特定安装的应用程序?
How do I find a specific installed app on the device?
我需要知道是否已经安装了一个特定的应用程序。我正在开发 Windows Phone 8.0 应用程序。我试图通过在注册表中搜索来做到这一点,但没有找到 Registry
class:
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;
}
}
由于 security/privacy 原因,您无法查看用户 phone 上安装了哪些应用程序。
您也可以 developed/published 自己启动应用程序。查看此页面了解详情:https://msdn.microsoft.com/library/windows/apps/jj207014(v=vs.105).aspx
我需要知道是否已经安装了一个特定的应用程序。我正在开发 Windows Phone 8.0 应用程序。我试图通过在注册表中搜索来做到这一点,但没有找到 Registry
class:
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;
}
}
由于 security/privacy 原因,您无法查看用户 phone 上安装了哪些应用程序。
您也可以 developed/published 自己启动应用程序。查看此页面了解详情:https://msdn.microsoft.com/library/windows/apps/jj207014(v=vs.105).aspx