Windows: driver status banner, OTA never reboots unprompted, no UAC prompt at plug time - #90
Merged
Merged
Conversation
Windows dashboard gains a driver banner showing whether ViGEmBus and HIDMaestro are installed, their installed version against the version this build bundles, and whether ViGEmBus is waiting on a restart to finish an upgrade. Green strip when both are current; amber/red with the fix as the action (pending Satellite update, which carries both drivers, or the installer for the running version). /api/backend/status and /api/server/capabilities fill driverVersion on Windows (ViGEmBus.sys file version; HIDMaestro driver-store INF DriverVer) and gain additive bundledVersion, versionState and restartPending fields. Pins live in src/platform/windows/driver_pins.h and version-consistency.yml keeps installer.iss in step. Upgrade path fix: the in-app updater ran the installer /VERYSILENT without /NORESTART, so a bundled ViGEmBus upgrade returning 3010 rebooted the PC unprompted. It now passes /NORESTART, the installer logs driver failures instead of raising modals under /OTA, and the banner reports the pending restart.
The update banner's four buttons overflowed the 440px card: the actions container had flex-shrink: 0, so once it wrapped onto its own line it kept its max-content width and its inner flex-wrap never triggered. Let it shrink and cap it at the row width. The driver banner's action moves onto its own row, and it no longer duplicates the update banner's Download button when a pending update already carries both drivers.
…ompt Creating a HIDMaestro virtual device needs an administrator token; until now satellite spawned satellite-hm-helper.exe with runas on the first HIDMaestro plug of each session, one UAC prompt at the moment nobody is at the PC. Setup now registers the same helper as the LocalSystem service SatelliteHmBroker (demand-start, named-pipe trigger, SERVICE_START granted to interactive users, exits after five idle minutes) and satellite talks to it over \.\pipe\satellite-hm-broker. The broker admits only interactive logons and only the installed satellite.exe beside it; satellite accepts the pipe only when its server PID is the registered service's PID. The runas path stays as the fallback (service absent, /HIDMAESTRO=skip, or a second concurrent session refused as busy). Helper gains `service` (advapi32 dispatcher, no new dependency) and `broker` (console) modes. Installer stops the service before replacing files, registers or removes it at post-install, and removes it on uninstall. scripts/test-broker-service.ps1 exercises the SCM-hosted path from an elevated shell.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three things on this branch:
/VERYSILENTwithout/NORESTART; a bundled ViGEmBus upgrade over an older driver can exit 3010, which a very-silent Inno run answers by rebooting the PC. Fixed, with driver failures logged instead of raised as modals under/OTA.satellite-hm-helper.exeas the LocalSystem serviceSatelliteHmBroker("Satellite Controller Broker"). Satellite reaches it over\\.\pipe\satellite-hm-brokerinstead of spawning an elevated helper, so the first plug of a session no longer needs someone at the PC. Therunaspath remains as the fallback.Broker service design
sc triggerinfo start/namedpipe/...) or by satellite itself (setup's SDDL grants interactive usersSERVICE_START); exits after five idle minutes.satellite.exebeside the helper (QueryFullProcessImageName, run as SYSTEM) in an interactive session.GetNamedPipeServerProcessIdequals the registered service's PID fromQueryServiceStatusEx, so a squatted pipe name is refused, and it falls back to the spawned helper.busyand falls back.service(advapi32 dispatcher, no new NuGet dependency) andbroker(console) modes;helloanswers"broker":trueover the service.PrepareToInstallstops the service before files are replaced;ssPostInstallcreates/reconfigures it (sc create|config,description,sdset,triggerinfo,failure) when the hidmaestro component is selected and/HIDMAESTRO=skipis not passed, otherwise removes it; uninstall removes it before files go.API (additive,
/api/backend/status+/api/server/capabilities)Per
backends[]entry on Windows:driverVersionnow filled (ViGEmBus.sys file version; HIDMaestro driver-store INFDriverVer, 1.7.0 embeds1.4.7.12), plusbundledVersion,versionState(current/outdated/newer/unknown) andrestartPending. Pins insrc/platform/windows/driver_pins.h, checked againstinstaller.issbyversion-consistency.yml.Tests
test_driver_inf;test_semverdotted compare;test_backend_registryversion-state + JSON fields;test_routes_adminfield presence. All local MinGW suites pass; clang-format 22.1.4 clean.brokermode accepts repeated connections, authorizes by client image path (a PowerShell client is refused withclient not satellite.exe), and re-creates its pipe instance (a DACL bug there was found and fixed).scripts/test-broker-service.ps1registers the service against the built helper, asserts it hosts in session 0, answers on the pipe, restarts from the named-pipe trigger after a stop, and carries theSERVICE_STARTgrant, then removes it. Not run in this session (no elevation available); please run it once before merging.scripts/test-installer-roundtrip.ps1additionally asserts no service exists under/HIDMAESTRO=skipand after uninstall.Docs
CHANGELOG 2.0.0 (two paragraphs), README ("Upgrading", broker paragraph, switch table),
docs/architecture.md(Elevation story),docs/contract.md(new fields),SECURITY.md(broker boundary in scope),redist/README.md(pin-bump recipe).