InstalledDesktopApp Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides a list of installed Win32 apps available to the current user. This includes apps installed for all users as well as only for the current user.
public ref class InstalledDesktopApp sealed : IStringable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 393216)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class InstalledDesktopApp final : IStringable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 393216)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class InstalledDesktopApp : IStringable
Public NotInheritable Class InstalledDesktopApp
Implements IStringable
- Inheritance
- Attributes
- Implements
Device family |
Windows 10, version 1803 (introduced in 10.0.17134.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v6.0)
|
App capabilities |
packageQuery
|
IReadOnlyList<IInstalledDesktopApp> installedApps = await InstalledDesktopApp.GetInventoryAsync();
foreach (var app in installedApps)
{
Console.WriteLine("Display Name: " + app.DisplayName);
Console.WriteLine("Application ID: " + app.Id);
Console.WriteLine("Publisher: " + app.Publisher);
Console.WriteLine("Display Version: " + app.DisplayVersion);
}
InstalledDesktopApp checks for the packageQuery capability and returns an empty vector if the capability isn’t held by the caller.
Display |
Gets the display name of the installed desktop app. |
Display |
Gets the string-based version of the installed desktop app. |
Id |
Gets the string-based ID of the installed desktop app. |
Publisher |
Gets the publisher of the installed desktop app. |
Get |
Gets a list of installed Win32 apps available to the current user. This includes apps installed for all users as well as only for the current user. |
To |
Returns a string that represents the current InstalledDesktopApp object. |
Product | Versions |
---|---|
WinRT | Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |