UDC: correct CLI arg signature to compact site + dash-prefixed machine#
UDC_Setup.exe and UDC.exe expect: UDC_Setup.exe WestJefferson -7605 Not the spaced-quoted positional pair we'd been passing: UDC_Setup.exe "West Jefferson" 7605 The wrong format meant UDC ignored both args, fell back to defaults (Site=Evendale, MachineNumber=blank). Combined with the kill-after-detect window, neither value got persisted to udc_settings.json regardless of whether UDC.exe was given time to write. Changes: - preinstall.json: UDC InstallArgs now "WestJefferson -9999" - 00-PreInstall-MachineApps.ps1: site override now matches/replaces the compact 'WestJefferson' token (not 'West Jefferson') and uses siteNameCompact from site-config; targetNum extraction regex updated to '-(\d+)$' for the new dash-prefix format - Update-MachineNumber.ps1: UDC.exe relaunch now passes positional compact-site + dash-prefixed number instead of -site/-machine flags Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -129,7 +129,10 @@ function Update-MachineNumber {
|
||||
# --- Relaunch UDC with new args ---
|
||||
if ((Test-Path $script:UdcExePath) -and $out.UdcUpdated) {
|
||||
try {
|
||||
Start-Process -FilePath $script:UdcExePath -ArgumentList @('-site', "`"$Site`"", '-machine', $NewNumber)
|
||||
# UDC.exe arg signature: positional compact-site (no space), then
|
||||
# dash-prefixed machine number. Example: UDC.exe WestJefferson -7605
|
||||
$siteCompact = ($Site -replace '\s+','')
|
||||
Start-Process -FilePath $script:UdcExePath -ArgumentList @($siteCompact, "-$NewNumber")
|
||||
} catch {
|
||||
$out.Errors += "UDC relaunch failed: $_"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user