how to get list of all installed apps and run them in UWP WinRT 8.1

好久不见. 提交于 2019-12-11 14:29:12

问题


I'm actually creating an UWP 8.1 app for one of my client.And I've got some little issue with it.At some point of my app I've to get all the names of installed app in the device and view it as a list.When the user will click on any of them, I've to launch that certain app. I've already tried to add restricted capabilities in the app manifest but it shows a blue line when I add, Morever I can get access to the AppData/Packages by using folderpicker somehow but don't know what to do. The app is for WinRT surface 3 and it isn't going to store or anything it has only one user. So if anyone know any sort of solution please let me know.


回答1:


The PackageManager class has the methods to enumerate all installed apps.

However, in 8.1 the PackageManager can only be used in desktop apps (e.g. WPF, Winforms, Win32). It cannot be used from a Store app on that version of the operating system.

On Windows 10 you can use the class from both Store/UWP apps as well as classic desktop apps.



来源:https://stackoverflow.com/questions/45170492/how-to-get-list-of-all-installed-apps-and-run-them-in-uwp-winrt-8-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!