InstalledDesktopApp.GetInventoryAsync Method
Definition
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.
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.
public:
static IAsyncOperation<IVectorView<InstalledDesktopApp ^> ^> ^ GetInventoryAsync();
/// [Windows.Foundation.Metadata.RemoteAsync]
static IAsyncOperation<IVectorView<InstalledDesktopApp>> GetInventoryAsync();
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<IReadOnlyList<InstalledDesktopApp>> GetInventoryAsync();
function getInventoryAsync()
Public Shared Function GetInventoryAsync () As IAsyncOperation(Of IReadOnlyList(Of InstalledDesktopApp))
Returns
Returns an async operation indicating that the task has completed and containing a list of installed Win32 apps available to the current user.
- Attributes
Examples
IReadOnlyList<InstalledDesktopApp> 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
The list includes apps installed for all users as well as only for the current user.