CMM: subtype gating + relax exact-version + conditional cleanup + DODA placeholder

Carries over the lessons learned from wax/trace + Keyence imaging today
and threads the same pattern through the CMM path.

09-Setup-CMM.ps1:
- Pass PCType + PCSubType to Install-FromManifest so the manifest's
  per-entry PCTypes filter is honored. Without this every entry runs
  regardless of bay variant - the same bug Keyence had before per-model
  gating was added.
- Move bootstrap cleanup to a conditional that only deletes
  C:\CMM-Install once every (filter-applicable) manifest entry detects
  as installed. If a Hexagon installer forces an unplanned reboot
  mid-install, the new Run-ShopfloorSetup self-resume RunOnce fires on
  the next auto-login; the staging dir needs to still be on disk for
  the re-run to recover. Logs "retained ... not all entries installed
  yet - will retry on next self-resumed run" when partial.

cmm-manifest.json:
- Drop exact DetectionValue from PC-DMIS 2016, PC-DMIS 2019 R2, CLM
  1.8.73, and goCMM. Detection is now uninstall-key presence only, so
  a Hexagon security patch that bumps the DisplayVersion does not
  trigger a re-install loop with exit 1638 every GE-Enforce cycle.
  Bumping the installer in apps/ is the upgrade path - manifest engine
  detection should not also be a version drift catcher for vendor MSIs
  whose backward-compat is established by the vendor.
- Specific to goCMM: the installer filename version (1.1.6718.31289)
  does not match what the installer registers under its uninstall key.
  Dropping DetectionValue silences the false-mismatch loop the prior
  version would have triggered.
- Add DODA placeholder entry gated to PCTypes=["cmm-doda"]. Real
  Installer filename, args, and DetectionPath still TODO once the
  DODA binary is sourced + dropped at installers-post/cmm/.

startnet.cmd:
- Add :cmm_submenu after the user picks gea-shopfloor-cmm from the
  main menu. Two options: Standard (default PC-DMIS + CLM + goCMM
  + Protect Viewer) or With DODA. Mirrors :keyence_submenu pattern.
- Write CMMVARIANT to W:\Enrollment\pc-subtype.txt so Install-FromManifest
  on the bay can apply the PCTypes filter against gea-shopfloor-cmm-doda.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
cproudlock
2026-05-22 09:48:16 -04:00
parent 45f39fd431
commit 548d85fed5
3 changed files with 89 additions and 23 deletions

View File

@@ -87,6 +87,7 @@ if "%ges_choice%"=="9" set PCTYPE=gea-shopfloor-display
if "%PCTYPE%"=="" goto gea_shopfloor_submenu
if "%PCTYPE%"=="gea-shopfloor-display" goto display_submenu
if "%PCTYPE%"=="gea-shopfloor-keyence" goto keyence_submenu
if "%PCTYPE%"=="gea-shopfloor-cmm" goto cmm_submenu
goto enroll_menu
:keyence_submenu
@@ -109,6 +110,24 @@ if "%KEYENCEMODEL%"=="" goto keyence_submenu
echo Keyence model: %KEYENCEMODEL%
goto enroll_menu
:cmm_submenu
cls
echo.
echo ========================================
echo CMM Variant
echo ========================================
echo.
echo 1. Standard PC-DMIS 2016/2019 R2 + CLM + goCMM + Protect Viewer
echo 2. With DODA Standard set plus DODA shopfloor add-on
echo.
set CMMVARIANT=
set /p cmm_choice=Enter your choice (1-2):
if "%cmm_choice%"=="1" set CMMVARIANT=standard
if "%cmm_choice%"=="2" set CMMVARIANT=doda
if "%CMMVARIANT%"=="" goto cmm_submenu
echo CMM variant: %CMMVARIANT%
goto enroll_menu
:display_submenu
cls
echo.
@@ -372,6 +391,9 @@ if not "%KEYENCEMODEL%"=="" (
echo %KEYENCEMODEL%> W:\Enrollment\keyence-model.txt
echo %KEYENCEMODEL%> W:\Enrollment\pc-subtype.txt
)
REM CMM variant goes to pc-subtype.txt (read by 09-Setup-CMM and the
REM Install-FromManifest PCTypes filter to gate the DODA app entry).
if not "%CMMVARIANT%"=="" echo %CMMVARIANT%> W:\Enrollment\pc-subtype.txt
copy /Y "Y:\shopfloor-setup\Run-ShopfloorSetup.ps1" "W:\Enrollment\Run-ShopfloorSetup.ps1"
REM --- Always copy Shopfloor baseline scripts ---
mkdir W:\Enrollment\shopfloor-setup 2>NUL