![](/img/trans.png)
[英]what is the replacement of c# CollectionBase in windows 8 Store Apps?
[英]Is there a way to detect what Windows Store apps are installed on a system with native C# calls?
我正在尝试为我正在构建的C#应用程序复制Get-AppxPackage和Get-ProvisionedAppxPackage Powershell cmdlet的功能,但不知道如何开始。
由于这个问题 ,我不能使用C#Powershell API,所以如果可能的话,我想要一个原生的C#解决方案。
您可以使用Windows.Management.Deployement.PackageManager从代码而不是PowerShell中查找,删除,安装等软件包。
Enumerate app packages示例演示了如何在C#和C ++中使用它。
为了它的价值,我确实找到了一种直接从WMI获取此信息的方法:有一个名为Win32_InstalledStoreProgram的WMI类,它返回所需的信息
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.