简体   繁体   中英

Is there a way to detect what Windows Store apps are installed on a system with native C# calls?

I'm trying to replicate the functionality of the Get-AppxPackage and Get-ProvisionedAppxPackage Powershell cmdlets for a C# application I'm building, but have no idea how to even get started.

I can't use the C# Powershell API because of this problem , so I'd like a native C# solution if possible.

You can use the Windows.Management.Deployement.PackageManager to find, remove, install, etc. packages from code rather than from PowerShell.

The Enumerate app packages sample demonstrates how to use this from C# and C++.

为了它的价值,我确实找到了一种直接从WMI获取此信息的方法:有一个名为Win32_InstalledStoreProgram的WMI类,它返回所需的信息

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM