Shopfloor Display: move kiosk app install to preinstall system

Install-KioskApp.cmd wrapper reads display-type.txt and runs the
matching Inno Setup installer (Lobby or Dashboard). Replaces the
standalone 09-Setup-Display.ps1 for uniform app install pipeline.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
cproudlock
2026-04-13 11:38:59 -04:00
parent 8455c80aa4
commit 743bc91996
3 changed files with 61 additions and 45 deletions

View File

@@ -0,0 +1,43 @@
@echo off
REM Install-KioskApp.cmd - Install Lobby Display or Dashboard kiosk app
REM
REM Reads C:\Enrollment\display-type.txt to determine which app to install.
REM Only runs on Display PCs (PCTypes filter in preinstall.json).
REM Both installers live alongside this script in the staged display\ subtree.
set "TYPEFILE=C:\Enrollment\display-type.txt"
if not exist "%TYPEFILE%" (
echo No display-type.txt found - skipping kiosk app install.
exit /b 0
)
set /p DISPLAYTYPE=<"%TYPEFILE%"
if /i "%DISPLAYTYPE%"=="Lobby" (
set "INSTALLER=%~dp0GEAerospaceLobbyDisplaySetup.exe"
set "APPNAME=Lobby Display"
) else if /i "%DISPLAYTYPE%"=="Dashboard" (
set "INSTALLER=%~dp0GEAerospaceDashboardSetup.exe"
set "APPNAME=Dashboard"
) else (
echo Unknown display type: %DISPLAYTYPE%
exit /b 1
)
if not exist "%INSTALLER%" (
echo %APPNAME% installer not found: %INSTALLER%
exit /b 1
)
echo Installing %APPNAME%...
"%INSTALLER%" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /LOG="C:\Logs\PreInstall\%APPNAME%-install.log"
set EXITCODE=%errorlevel%
if %EXITCODE% equ 0 (
echo %APPNAME% installed successfully.
) else (
echo %APPNAME% exited with code %EXITCODE%.
)
exit /b %EXITCODE%

View File

@@ -144,6 +144,15 @@
"DetectionPath": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\UDC", "DetectionPath": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\UDC",
"PCTypes": ["Standard"] "PCTypes": ["Standard"]
}, },
{
"_comment": "Display kiosk app (Lobby Display or Dashboard). Install-KioskApp.cmd wrapper reads C:\\Enrollment\\display-type.txt to determine which installer to run. Both GEAerospaceLobbyDisplaySetup.exe and GEAerospaceDashboardSetup.exe must be staged in the display\\ subtree alongside the wrapper. Inno Setup /VERYSILENT is idempotent so no detection needed.",
"Name": "Display Kiosk App",
"Installer": "display\\Install-KioskApp.cmd",
"Type": "EXE",
"InstallArgs": "",
"LogFile": "C:\\Logs\\PreInstall\\Dashboard-install.log",
"PCTypes": ["Display"]
},
{ {
"_comment": "Shopfloor Standard serial-port drivers: StarTech PCIe serial adapter (MosChip-based) + Prolific PL2303 USB-to-serial. Install-Drivers.cmd runs pnputil /add-driver with /subdirs /install so every bundled INF under drivers/ lands in the Windows driver store and auto-binds to matching hardware present now or plugged in later. Scoped to Standard PCs (both Machine + Timeclock) because the PCTypes filter is type-level only; installing a serial driver on a Timeclock without the hardware is harmless - it just sits in the driver store.", "_comment": "Shopfloor Standard serial-port drivers: StarTech PCIe serial adapter (MosChip-based) + Prolific PL2303 USB-to-serial. Install-Drivers.cmd runs pnputil /add-driver with /subdirs /install so every bundled INF under drivers/ lands in the Windows driver store and auto-binds to matching hardware present now or plugged in later. Scoped to Standard PCs (both Machine + Timeclock) because the PCTypes filter is type-level only; installing a serial driver on a Timeclock without the hardware is harmless - it just sits in the driver store.",
"Name": "Shopfloor Serial Drivers", "Name": "Shopfloor Serial Drivers",

View File

@@ -1,45 +1,9 @@
# 09-Setup-Display.ps1 -- Display-specific setup (runs after Shopfloor baseline) # 09-Setup-Display.ps1 -- Display-specific setup (runs after Shopfloor baseline)
# Reads display-type.txt to install either LobbyDisplay or Dashboard kiosk app. #
# Kiosk app installation moved to preinstall.json (Install-KioskApp.cmd wrapper).
$enrollDir = "C:\Enrollment" # The wrapper reads display-type.txt and installs the matching kiosk app during
$typeFile = Join-Path $enrollDir "display-type.txt" # the baseline preinstall phase (00-PreInstall-MachineApps.ps1).
$setupDir = Split-Path -Parent $MyInvocation.MyCommand.Path #
# This script is intentionally empty. Remove it once confirmed working.
if (-not (Test-Path $typeFile)) {
Write-Warning "No display-type.txt found - skipping display setup." Write-Host "=== Display Setup: kiosk app installed via preinstall system ==="
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 ==="