diff --git a/playbook/shopfloor-setup/gea-shopfloor-cmm/scripts/Install-goCMMSettings.ps1 b/playbook/shopfloor-setup/gea-shopfloor-cmm/scripts/Install-goCMMSettings.ps1 index e7e8a3a..a08cc09 100644 --- a/playbook/shopfloor-setup/gea-shopfloor-cmm/scripts/Install-goCMMSettings.ps1 +++ b/playbook/shopfloor-setup/gea-shopfloor-cmm/scripts/Install-goCMMSettings.ps1 @@ -108,6 +108,15 @@ if (Test-Path $reg) { 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) --- if ($SelectedPartGroup) { if (-not (Test-Path $goCmmKey)) { New-Item -Path $goCmmKey -Force | Out-Null }