使用C#,如何检测我的UWP应用程序是否安装在Windows 10上 [英] Using C#, how can I detect if my UWP app is installed on Windows 10
问题描述
使用任何C#应用程序(WinForm等),如何检测我的UWP应用程序是否安装在Windows 10上。有人可以提供简单的代码示例和/或这种情况的一些有用的在线示例吗?
您好,
您应该使用 PackageManager类 枚举所有包,
使用您的包名称来检查它是否存在。有关如何在您的应用中使用PackageManager,请阅读这些 帖子
第一个是
从桌面应用程序调用Windows 10 API 。
第二个是 以编程方式启动Windows应用商店应用
Using any C# app (WinForm etc.), how can I detect if my UWP app is installed on Windows 10. Can someone provide a simple code sample and/or some useful online example of such scenario?
Hello,
You should use PackageManager Class to enumerate all packages and use your package family name to check whether it exist or not. For how to use PackageManager in your app read these posts
The first is call Windows 10 API from desktop application .
The second is Launching Windows Store Apps Programmatically
这篇关于使用C#,如何检测我的UWP应用程序是否安装在Windows 10上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!