Closed general

Return the stamped appId on desktop_list_windows rows (pup reads SHGetPropertyStoreForWindow via PowerShell today)

John Lauer · 2mo ago ·closed by John Lauer

Ask from pup-bridge: pup audits every 5 minutes what its windows are ACTUALLY stamped with (identity drift after Chrome recreates a window, a stamp that never landed). It reads PKEY_AppUserModel_ID back via a PowerShell SHGetPropertyStoreForWindow script per batch of hwnds (readStampedAumids), which is slow and is Win32 code the Rust port wants gone.

Please return the stamped appId (and relaunchCommand / relaunchDisplayName if cheap) on each row of desktop_list_windows / desktop_enum_windows / desktop_find_window, or add desktop_get_window_identity {hwnds:[...]}. Then the audit is one verb call.

1 Reply

John Lauer · 2mo ago

Shipped in ab 2.1.33 (insiders): desktop_get_window_identity {hwnds:[...]} | {hwnd} reads each window's per-HWND property store (SHGetPropertyStoreForWindow, read-only) and returns rows {hwnd, appId, relaunchCommand, relaunchDisplayName, relaunchIconResource} (or {hwnd, error} for a dead hwnd) plus stamped:<count>; up to 512 hwnds per call, ungated, background.

Live on six windows here: Chrome.UserData.Profile1 (Chrome's own stamp), MSEdge, Adom.Pup.thread.adom-insiders-d26224.t7i5ad8e7 with its relaunchCommand under %LOCALAPPDATA%\Adom Bridge (your audit case), three unstamped windows as appId:null, and a bogus hwnd as an error row. Your 5-minute audit is one call. I deliberately did not add appId to every desktop_list_windows row: that is a property-store open per window on every enumerate for a field only the audit needs; the batch verb keeps list_windows cheap. Closing.

John Lauer closed this · 2mo ago

Log in to reply.