# 01-Setup-Display.ps1 — Display-specific setup (runs after Shopfloor baseline) # Reads display-type.txt to install either LobbyDisplay or Dashboard kiosk app. $enrollDir = "C:\Enrollment" $typeFile = Join-Path $enrollDir "display-type.txt" $setupDir = Split-Path -Parent $MyInvocation.MyCommand.Path if (-not (Test-Path $typeFile)) { Write-Warning "No display-type.txt found - skipping display setup." return } $displayType = (Get-Content $typeFile -First 1).Trim() Write-Host "=== Display Setup: $displayType ===" switch ($displayType) { "Lobby" { $installer = Join-Path $setupDir "GEAerospaceLobbyDisplaySetup.exe" $appName = "Lobby Display" } "Dashboard" { $installer = Join-Path $setupDir "GEAerospaceDashboardSetup.exe" $appName = "Dashboard" } default { Write-Warning "Unknown display type: $displayType" return } } if (-not (Test-Path $installer)) { Write-Warning "$appName installer not found at $installer - skipping." return } Write-Host "Installing $appName..." $proc = Start-Process -FilePath $installer -ArgumentList '/VERYSILENT', '/SUPPRESSMSGBOXES', '/NORESTART', "/LOG=C:\Enrollment\$appName-install.log" -Wait -PassThru if ($proc.ExitCode -eq 0) { Write-Host "$appName installed successfully." } else { Write-Warning "$appName exited with code $($proc.ExitCode). Check C:\Enrollment\$appName-install.log" } Write-Host "=== Display Setup Complete ==="