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)