在 UWP 中获取已安装的应用程序列表 [英] Get installed application list in UWP

查看:23
本文介绍了在 UWP 中获取已安装的应用程序列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序需要读取用户移动设备上所有已安装应用程序的名称.但我不能那样做.如何在 Windows 10 移动版上的通用 Windows 平台中获取已安装应用程序的列表?

I have an application that needs to reads name of all installed app on user mobile. but i can't do that. How can i get list of installed applications in Universal Windows Platform on windows 10 mobile?

感谢您的帮助

推荐答案

您需要添加Windows Mobile Extensions for the UWP 并使用以下代码:

You need to add Windows Mobile Extensions for the UWP and use the following code:

if (ApiInformation.IsTypePresent("Windows.Phone.Management.Deployment.InstallationManager"))
{
    var packages = Windows.Phone.Management.Deployment.InstallationManager.FindPackages();
    foreach (var package in packages)
    {
        Debug.WriteLine(package.DisplayName);
    }
}

但此代码需要 ID_CAP_OEM_DEPLOYMENT.据我所知 msdn

But this code requires ID_CAP_OEM_DEPLOYMENT. As I know from msdn

我假设您需要公司证书,并且必须使用该证书签署您的应用程序才能使这些权限发挥作用.

I would assume that you would require a company certificate and would have to sign your Apps with that certificate in order for those permissions to work.

这篇关于在 UWP 中获取已安装的应用程序列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆