From a72db8af5e2a41dcae5bb41f680a63122fb40dc2 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Thu, 30 Apr 2026 12:58:00 -0400 Subject: [PATCH] Add Install-UDCWebServerConfig.cmd for ongoing manifest enforcement Wrapper invoked by Install-FromManifest.ps1 (Type=CMD) when Hash detection on C:\ProgramData\UDC\udc_webserver_settings.json fails. Mirrors the Install-eMxInfo.cmd pattern: copies the colocated json from the SFLD machineapps share into ProgramData\UDC. Manifest entry (with DetectionValue 4E04A865...DEA3) goes in machineapps-manifest.json on the SFLD share - separate from this repo. --- .../Standard/Install-UDCWebServerConfig.cmd | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 playbook/shopfloor-setup/Standard/Install-UDCWebServerConfig.cmd diff --git a/playbook/shopfloor-setup/Standard/Install-UDCWebServerConfig.cmd b/playbook/shopfloor-setup/Standard/Install-UDCWebServerConfig.cmd new file mode 100644 index 0000000..14dc574 --- /dev/null +++ b/playbook/shopfloor-setup/Standard/Install-UDCWebServerConfig.cmd @@ -0,0 +1,24 @@ +@echo off +REM Install-UDCWebServerConfig.cmd - copy udc_webserver_settings.json into +REM C:\ProgramData\UDC\. Run by Install-FromManifest.ps1 (Type=CMD) when +REM Hash detection on the deployed copy fails. +REM +REM Source file is colocated with this installer on the SFLD machineapps +REM share (\\tsgwp00525...\shared\dt\shopfloor\main\machineapps\). When the +REM canonical UDC web server address rotates, drop the new json on the +REM share, recompute SHA256, paste into machineapps-manifest.json +REM DetectionValue. Every Standard-Machine PC catches up on next user logon. + +set "SRC=%~dp0udc_webserver_settings.json" +if not exist "%SRC%" ( + echo Install-UDCWebServerConfig: source not found at %SRC% + exit /b 1 +) + +set "DST=C:\ProgramData\UDC" +if not exist "%DST%\" mkdir "%DST%" 2>nul + +copy /Y "%SRC%" "%DST%\udc_webserver_settings.json" >nul || exit /b 2 + +echo Install-UDCWebServerConfig: deployed udc_webserver_settings.json to %DST% +exit /b 0