![](/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.