goCMM restore: drop the 1.1 Installation Directory value on 2.x PCs

Per-bay backups were taken under goCMM 1.1, so goCMM.reg restores
Installation Directory = the 1.1 folder. goCMM 2.x never reads it, but the 2.x
installer sees it as '1.1 installed' and shows a dialog /S cannot answer,
which hung GE-Enforce on CMM11 and CMM12. Kept when 1.1 really is installed.
This commit is contained in:
cproudlock
2026-10-13 16:58:55 -04:00
parent bfd5c5b75e
commit 28cd977c9e

View File

@@ -108,6 +108,15 @@ if (Test-Path $reg) {
if (-not (Test-Path $goCmmKey)) { New-Item -Path $goCmmKey -Force | Out-Null } if (-not (Test-Path $goCmmKey)) { New-Item -Path $goCmmKey -Force | Out-Null }
} }
# The per-bay backups were taken under goCMM 1.1, so goCMM.reg carries
# "Installation Directory" = the 1.1 folder. goCMM 2.x never reads it, but its
# installer treats it as "1.1 still installed" and shows a dialog /S cannot
# answer, which hangs GE-Enforce. Drop it unless 1.1 really is installed here.
if (-not (Test-Path 'C:\Program Files (x86)\General Electric\goCMM\goCMM.exe')) {
Remove-ItemProperty -Path $goCmmKey -Name 'Installation Directory' -ErrorAction SilentlyContinue
Log "Removed 1.1 'Installation Directory' value (goCMM 1.1 not installed)"
}
# --- Optional per-bay Selected Part Group override (use when restoring to a different bay) --- # --- Optional per-bay Selected Part Group override (use when restoring to a different bay) ---
if ($SelectedPartGroup) { if ($SelectedPartGroup) {
if (-not (Test-Path $goCmmKey)) { New-Item -Path $goCmmKey -Force | Out-Null } if (-not (Test-Path $goCmmKey)) { New-Item -Path $goCmmKey -Force | Out-Null }