# 02-Setup-HeatTreat.ps1 - HeatTreat app setup (runs AFTER 01-eDNC.ps1). # # HeatTreat_6.2.1.msi is a WiX/GE Aviation installer, same lineage as Mark # and eDNC. Decompiled findings: # - LAUNCHNTLARS=true by default and the LaunchNtlars custom action fires # under /qn (condition NOT Installed AND LAUNCHNTLARS="true"). Pass # LAUNCHNTLARS=false to suppress it (same as 01-eDNC.ps1 and Mark). # - No ForceReboot/ScheduleReboot (only WixCheckRebootRequired, which just # 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. # # Log: C:\Logs\HeatTreat\02-Setup-HeatTreat.log $ErrorActionPreference = 'Continue' $logDir = 'C:\Logs\HeatTreat' if (-not (Test-Path $logDir)) { try { New-Item -ItemType Directory -Path $logDir -Force | Out-Null } catch {} } try { Start-Transcript -Path (Join-Path $logDir '02-Setup-HeatTreat.log') -Append -Force | Out-Null } catch {} Write-Host '=== HeatTreat Setup ===' $pxeStatusLib = Join-Path $PSScriptRoot '..\Shopfloor\lib\Send-PxeStatus.ps1' if (Test-Path $pxeStatusLib) { try { . $pxeStatusLib; Send-PxeStatus -Stage '02-Setup-HeatTreat: starting' -StageIndex 3 -StageTotal 8 } catch { } } $payloadDir = Join-Path $PSScriptRoot 'HeatTreat' # ============================================================================ # Install HeatTreat_6.2.1.msi # ============================================================================ $htMsi = Get-ChildItem -Path $payloadDir -Filter 'HeatTreat*.msi' -File -ErrorAction SilentlyContinue | Select-Object -First 1 if ($htMsi) { Write-Host "Installing HeatTreat: $($htMsi.Name)..." $p = Start-Process -FilePath 'msiexec.exe' ` -ArgumentList "/i `"$($htMsi.FullName)`" /qn /norestart LAUNCHNTLARS=false" ` -Wait -PassThru Write-Host " HeatTreat exit code: $($p.ExitCode)" } else { 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. if (Get-Command Send-PxeStatus -ErrorAction SilentlyContinue) { Send-PxeStatus -Stage '02-Setup-HeatTreat: complete' -StageIndex 4 -StageTotal 8 } Write-Host '=== HeatTreat Setup Complete ===' try { Stop-Transcript | Out-Null } catch {}