Code

How To Get Microsoft Windows App Store app's icon image from .exe:

How To Get Microsoft Windows App Store app's icon image from .exe:

Create a public variable:

List<AppStoreItem> AppFoldersList { get; set; } = new();


Create a custom class

// appstoreitem class
public class AppStoreItem {
public string AppName { get; set; }
public Bitmap AppIcon { get; set; }
}


Setup code to get the apps folder via the apps folder ID.
Enumerate through the apps folder and create vars using the above created 'AppStoreItem' class.
Add each AppStoreItem var to the above created public var 'AppFolderList'.

// GUID taken from https://learn.microsoft.com/en-us/windows/win32/shell/knownfolderid
var appsFolderID = new Guid("{1e87508d-89c2-42f0-8a7e-645a0f50ca58}");

// get appsfolder
ShellObject appsFolder = (ShellObject)KnownFolderHelper.FromKnownFolderId(appsFolderID);

// enumerate appsfolder
foreach (var iknownFolder in (IKnownFolder)appsFolder) {
// create new appstoreitem
AppStoreItem appStoreItem = new();
appStoreItem.AppName = iknownFolder.ToString();
appStoreItem.AppIcon = iknownFolder.Thumbnail.Bitmap;

// add appstoreitem to appfolderslist
AppFoldersList.Add(appStoreItem);
}