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