InstalledDesktopApp InstalledDesktopApp InstalledDesktopApp InstalledDesktopApp 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.

public : sealed class InstalledDesktopApp : IStringable
struct winrt::Windows::System::Inventory::InstalledDesktopApp : IStringable
public sealed class InstalledDesktopApp : IStringable
Public NotInheritable Class InstalledDesktopApp Implements IStringable
// This class does not provide a public constructor.
Attributes

Windows 10 requirements

Device family
Windows 10, version 1803 (introduced v10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v6)
Capabilities
packageQuery

Examples

IList<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 DisplayName DisplayName DisplayName DisplayName

Gets the display name of the installed desktop app.

DisplayVersion DisplayVersion DisplayVersion DisplayVersion DisplayVersion

Gets the string-based version of the installed desktop app.

Id Id Id Id Id

Gets the string-based ID of the installed desktop app.

Publisher Publisher Publisher Publisher Publisher

Gets the publisher of the installed desktop app.

Methods

GetInventoryAsync() GetInventoryAsync() GetInventoryAsync() GetInventoryAsync() 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() ToString() ToString() ToString() ToString()

Returns a string that represents the current InstalledDesktopApp object.