From e6533d5205e6a471a13202916c6c1fbf594ba437 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Thu, 30 Jul 2026 14:28:44 -0400 Subject: [PATCH] geenforce display dispatcher: purge legacy HKLM Run autostart The old LobbyDisplay/Dashboard Inno installers planted an HKLM ...\CurrentVersion\Run value (plus a Startup .lnk). The dispatcher already swept the stale .lnk/.url launchers but never the Run value, so a display with our new ShopDB Kiosk.lnk still relaunched the old kiosk URL at logon (the Run key beats the Startup shortcut). Remove the two legacy Run values and kill any running old-URL Edge so the display self-heals to the resolved target on the next enforce cycle. --- plugins/geenforce/seed_display_scope.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/plugins/geenforce/seed_display_scope.py b/plugins/geenforce/seed_display_scope.py index 7812c16..17821fe 100644 --- a/plugins/geenforce/seed_display_scope.py +++ b/plugins/geenforce/seed_display_scope.py @@ -198,6 +198,26 @@ Get-ChildItem -LiteralPath $startup -Filter '*.url' -ErrorAction SilentlyContinu }} catch {{}} }} +# Legacy HKLM Run autostarts the OLD Dashboard/Lobby Inno installers planted. +# The .lnk/.url sweep above misses these -- a Run value relaunches the old kiosk +# URL at every logon and BEATS our Startup shortcut (this is why a display with +# our new .lnk still opened the old page). Purge them, then kill any running +# old-URL Edge so the display self-heals to the resolved target this cycle. +$legacyRun = 'HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run' +foreach ($legacyName in @('GE Aerospace Dashboard','GE Aerospace Lobby Display')) {{ + try {{ + if ($null -ne (Get-ItemProperty -LiteralPath $legacyRun -Name $legacyName -ErrorAction SilentlyContinue)) {{ + Remove-ItemProperty -LiteralPath $legacyRun -Name $legacyName -Force -ErrorAction SilentlyContinue + Write-Host "removed legacy Run value $legacyName" + }} + }} catch {{}} +}} +try {{ + Get-CimInstance Win32_Process -Filter "Name = 'msedge.exe'" -ErrorAction SilentlyContinue | + Where-Object {{ $_.CommandLine -match 'tv-dashboard|shopfloor-dashboard' }} | + ForEach-Object {{ Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue; Write-Host "killed old-URL kiosk Edge pid $($_.ProcessId)" }} +}} catch {{}} + $edgeArgs = "--kiosk `"$kioskUrl`" --edge-kiosk-type=fullscreen" $lnkPath = Join-Path $startup 'ShopDB Kiosk.lnk' $lnk = $shell.CreateShortcut($lnkPath)