HeatTreat: import per-machine DNC .reg by machine number

HeatTreat bays pick a machine number (6601-6604) at imaging; 02-Setup-
HeatTreat now imports the matching reg\<machine-number>.reg after the MSI,
rewritten to WOW6432Node (DNC is 32-bit; reg import does not honor /reg:32),
mirroring the Part Marker WJPRT.reg flow.

- startnet.cmd: route gea-shopfloor-heattreat to the machine-number prompt
  (was defaulting to skip), so machine-number.txt is written for the picker.
- The 6601-6604 .reg files are gitignored (they carry a DNC FtpPasswd
  credential) and deploy via the enrollment share from the working tree.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
cproudlock
2026-06-01 11:21:58 -04:00
parent f6d970c08d
commit 0b116e3ecf
3 changed files with 42 additions and 7 deletions

4
.gitignore vendored
View File

@@ -114,3 +114,7 @@ playbook/shopfloor-setup/gea-shopfloor-keyence/vr6000/installers/Data1.cab
# Part Marker (Telesis) utility password - secret, deployed via the enrollment
# share from the working tree, never committed.
playbook/shopfloor-setup/gea-shopfloor-partmarker/PartMarker/Mark/utilpassword.txt
# HeatTreat per-machine DNC .reg exports (6601-6604) - contain DNC FtpPasswd
# credentials. Deployed via the enrollment share from the working tree.
playbook/shopfloor-setup/gea-shopfloor-heattreat/reg/*.reg

View File

@@ -9,10 +9,12 @@
# sets a flag) - so /norestart is safe.
# - Only LaunchCondition is NOT NEWERVERSIONDETECTED (blocks downgrade).
#
# NOTE: HeatTreat may also need a DNC .reg overlay (the WJPRT.reg has a
# [...\DNC\HeatTreat] subkey section) and/or a file copy, mirroring the Part
# Marker flow. That is unconfirmed - see the TODO below. Today this installs
# DNC (via 01-eDNC.ps1) + the HeatTreat MSI only.
# After the MSI, HeatTreat imports the per-machine DNC config .reg matching
# the machine number the tech entered at imaging (6601-6604). The .reg files
# ship in this type dir under reg\<machine-number>.reg. Like WJPRT.reg they
# target HKLM\SOFTWARE\GE Aircraft Engines\DNC (the 64-bit view as written),
# but DNC is a 32-bit app and reads WOW6432Node, so we rewrite the key paths
# to WOW6432Node before importing (reg import does not honor /reg:32).
#
# Log: C:\Logs\HeatTreat\02-Setup-HeatTreat.log
@@ -45,9 +47,37 @@ if ($htMsi) {
Write-Warning "HeatTreat MSI not found in $payloadDir (expected HeatTreat*.msi) - skipping install"
}
# TODO (unconfirmed): if HeatTreat needs a DNC .reg overlay + file copy like
# the Part Marker, add it here - import the .reg redirected to WOW6432Node and
# copy any overlay files into the install dir. Pending confirmation.
# ============================================================================
# Import the per-machine DNC config .reg (redirected to WOW6432Node)
# ============================================================================
$machineNum = ''
$mnFile = 'C:\Enrollment\machine-number.txt'
if (Test-Path -LiteralPath $mnFile) {
$machineNum = (Get-Content -LiteralPath $mnFile -First 1 -EA 0).Trim()
}
if ($machineNum) {
$regSrc = Join-Path $PSScriptRoot "reg\$machineNum.reg"
if (Test-Path -LiteralPath $regSrc) {
try {
$regText = Get-Content -LiteralPath $regSrc -Raw
$redirected = $regText -replace `
'HKEY_LOCAL_MACHINE\\SOFTWARE\\GE Aircraft Engines', `
'HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\GE Aircraft Engines'
$tmpReg = Join-Path $env:TEMP "$machineNum-wow6432.reg"
Set-Content -LiteralPath $tmpReg -Value $redirected -Encoding ASCII -Force
Write-Host "Importing $machineNum.reg (redirected to WOW6432Node)..."
$r = Start-Process -FilePath 'reg.exe' -ArgumentList "import `"$tmpReg`"" -Wait -PassThru
Write-Host " reg import exit code: $($r.ExitCode)"
Remove-Item -LiteralPath $tmpReg -Force -ErrorAction SilentlyContinue
} catch {
Write-Warning "Import of $machineNum.reg failed: $_"
}
} else {
Write-Warning "No DNC .reg for machine number $machineNum at $regSrc - DNC machine config NOT applied"
}
} else {
Write-Warning "machine-number.txt empty/missing - cannot pick a DNC .reg to import"
}
if (Get-Command Send-PxeStatus -ErrorAction SilentlyContinue) {
Send-PxeStatus -Stage '02-Setup-HeatTreat: complete' -StageIndex 4 -StageTotal 8

View File

@@ -214,6 +214,7 @@ REM CAL-{asset_tag}_serial-*_probe-*.iso.
set MACHINENUM=9999
if /i "%PCTYPE%"=="gea-shopfloor-collections" goto prompt_machinenum
if /i "%PCTYPE%"=="gea-shopfloor-nocollections" goto prompt_machinenum
if /i "%PCTYPE%"=="gea-shopfloor-heattreat" goto prompt_machinenum
if /i "%PCTYPE%"=="gea-shopfloor-waxtrace" goto prompt_waxtrace_asset
if /i "%PCTYPE%"=="gea-shopfloor-cmm" goto skip_machinenum
goto skip_machinenum