@punktfunk/plugin-windows-games

Adds every game Windows itself recognised that no launcher owns — a standalone installer, a portable folder, a DRM-free download — to a Punktfunk host's library. It is the Windows counterpart of the desktop-entries plugin on Linux.

Install it from the host's plugin store (Library → Game sources → Add a source), or:

punktfunk-host plugins add windows-games

Nothing to configure. Windows hosts only, and it needs a host that knows the gamebar launch kind.

What is read

Windows has no "this is a game" flag on installed programs. What it does have is Game Bar's list: when a game runs, Windows matches it against Microsoft's known-games list (or you tick "Remember this is a game" in Game Bar) and records the exe under HKCU\System\GameConfigStore\Children. This plugin reads that list for every signed-in user. A game appears once it has run on this PC.

Of those exes, it skips:

  • Launcher installs, which come from their own plugins with better ids, art and launches: any path through steamapps, WindowsApps, XboxGames, Epic Games, GOG Galaxy, GOG Games, Ubisoft, Amazon Games or itch, and any install whose folder holds .egstore (Epic), .build.info (Battle.net), goggame-*.info (GOG), .itch or fuel.json (Amazon).
  • java.exe / javaw.exe, which Game Bar flags for Minecraft-style games but which show nothing when started bare.
  • Exes that no longer exist.

The title and publisher come from the machine's Uninstall entry for the game (the deepest InstallLocation holding the exe, else the entry whose icon is the exe). Without one, the title is the game's folder name, climbing past bin, x64, Binaries\Win64 and the like. No art: covers for games no store describes are the job of a separate cover source.

Letting the plugin read your Game Bar list

Game Bar keeps its list in your user hive. The manifest names HKCU\System\GameConfigStore, and a current host grants it read-only in every signed-in account. An older host does not: the scan lists nothing and the log names the user and this command. In PowerShell, signed in as the user who plays:

$k = 'HKCU:\System\GameConfigStore'; $acl = Get-Acl $k; foreach ($s in 'S-1-5-19', 'S-1-15-2-3593280428-80996862-2813949412-194956687-4179918304-3245065330-1308965609') { $acl.AddAccessRule((New-Object System.Security.AccessControl.RegistryAccessRule((New-Object System.Security.Principal.SecurityIdentifier $s), 'ReadKey', 'ContainerInherit', 'None', 'Allow'))) }; Set-Acl $k $acl

The two SIDs are the host's plugin runner (NT AUTHORITY\LocalService) and this plugin's own sandbox; Windows lets the plugin read only what both may. That adds two inheritable read-only entries on Game Bar's key and nothing else in your profile. The hive is only loaded while you are signed in, which on a streaming host you are.

How a game starts

An entry carries its exe as a gamebar launch. The host (not this plugin) re-reads every signed-in user's Game Bar list and runs the exe only if the list still names that exact path, from the exe's own folder, as the signed-in user. The started process is the game, so the session ends when it exits.

Entries are published as windows-games:<id>, where the id is a hash of the exe's path: it stays the same across scans, and a moved install is a new entry.

Commands

punktfunk-plugin-windows-games detect            # is this Windows?
punktfunk-plugin-windows-games scan --preview    # what WOULD be synced, as JSON (works with no host)
punktfunk-plugin-windows-games uninstall         # drop the games and release the store claim

Run as yourself, scan --preview reads your own hive, so it needs no grant. The kit's parity verb has no baseline here: the host never had a built-in scanner for these games.

Development

bun install
bun run typecheck && bun test && bun run build

The registry is read in-process through advapi32: the plugin's sandbox refuses to start PowerShell, and reg.exe prints in the console's OEM code page, which garbles non-ASCII paths. Everything after the read is pure and tested with real Game Bar data, so the tests run without Windows.

Use of AI

This project uses AI for writing code.

License

MIT OR Apache-2.0.

S
Description
Punktfunk plugin: every game Windows recognised through Game Bar that no launcher owns, in the host's library.
Readme
95 KiB
0 Stars 1 Watchers 0 Forks
Languages
TypeScript 100%