Machine number input at PXE menu for Standard PCs
Adds a machine number prompt to startnet.cmd after the Standard sub-type
selection. Tech enters the number during the PXE boot process. Defaults
to 9999 if Enter is pressed (existing placeholder behavior).
Written to C:\Enrollment\machine-number.txt alongside pc-type.txt.
Consumers:
00-PreInstall-MachineApps.ps1 - replaces 9999 in UDC InstallArgs with
the entered number, so UDC installs with the correct machine number
from the start (no post-setup Set-MachineNumber needed).
01-eDNC.ps1 - writes the machine number to the DNC\General\MachineNo
registry value during eDNC install.
Configure-PC.ps1 - existing $needsMachineNumber check already skips
the prompt when UDC/eDNC aren't at 9999, so no change needed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -61,11 +61,21 @@ foreach ($c in $copies) {
|
||||
}
|
||||
}
|
||||
|
||||
# --- 3. Set DNC site ---
|
||||
# --- 3. Set DNC site + machine number ---
|
||||
$regBase = "HKLM\SOFTWARE\WOW6432Node\GE Aircraft Engines\DNC"
|
||||
reg add "$regBase\General" /v Site /t REG_SZ /d $siteNameCompact /f | Out-Null
|
||||
Write-Host " DNC site set to $siteNameCompact."
|
||||
|
||||
# Set machine number if tech entered one during PXE menu (defaults to 9999)
|
||||
$machineNumFile = 'C:\Enrollment\machine-number.txt'
|
||||
$machineNum = '9999'
|
||||
if (Test-Path -LiteralPath $machineNumFile) {
|
||||
$num = (Get-Content -LiteralPath $machineNumFile -First 1 -ErrorAction SilentlyContinue).Trim()
|
||||
if ($num -and $num -match '^\d+$') { $machineNum = $num }
|
||||
}
|
||||
reg add "$regBase\General" /v MachineNo /t REG_SZ /d $machineNum /f | Out-Null
|
||||
Write-Host " DNC MachineNo set to $machineNum."
|
||||
|
||||
# --- 4. Deploy custom eMxInfo.txt to both Program Files paths ---
|
||||
if (Test-Path $emxInfo) {
|
||||
$dest86 = "C:\Program Files (x86)\DNC\Server Files"
|
||||
|
||||
Reference in New Issue
Block a user