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.
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user