InstalledDesktopApp Class

Definition

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.

C#
[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
Inheritance
Object InstalledDesktopApp
Attributes
Implements

Windows requirements

Device family
Windows 10, version 1803 (introduced in 10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v6.0)
App capabilities
packageQuery

Examples

C#
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);
}

Remarks

InstalledDesktopApp checks for the packageQuery capability and returns an empty vector if the capability isn’t held by the caller.

Properties

DisplayName

Gets the display name of the installed desktop app.

DisplayVersion

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.

Methods

GetInventoryAsync()

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.

ToString()

Returns a string that represents the current InstalledDesktopApp object.

Applies to

Product Versions
WinRT Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100