CMM: seed goCMM Shared Data Directory per bay + grant Users write

goCMM (.NET x86) stores its program-source path in HKLM\SOFTWARE\
WOW6432Node\General Electric\goCMM value 'Shared Data Directory'. Being
HKLM, a non-admin shopfloor user cannot set it via goCMM's UI (nor save a
Selected Part Group switch). 09-Setup-CMM Step 2.7 now seeds the per-bay
path (admin context at imaging) and grants BUILTIN\Users write on the key,
mirroring the existing Step 2.5 install-dir ACL grant.

- cmm-bay-config.csv: add shared_data_dir column (per-bay paths, CMM1-12).
- resolve-cmm-bay-config.ps1: write C:\Enrollment\cmm\shareddatadir.txt
  (space-safe; e.g. CMM8 'Venture CMM8').
- 09-Setup-CMM.ps1: Step 2.7 reg seed + Users ACL on the goCMM key.

Not yet deployed to the live server (held).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
cproudlock
2026-06-01 10:59:55 -04:00
parent 59b1a9fb65
commit f6d970c08d
3 changed files with 89 additions and 16 deletions

View File

@@ -40,11 +40,21 @@ if (-not (Test-Path $OutDir)) {
$version = $match.pcdmis_version.Trim()
$doda = $match.doda.Trim().ToLower()
# shared_data_dir may legitimately contain spaces (e.g. CMM8 "Venture CMM8").
# Trim() strips only leading/trailing whitespace, never internal spaces.
$sharedDataDir = ''
if ($match.PSObject.Properties['shared_data_dir'] -and $match.shared_data_dir) {
$sharedDataDir = $match.shared_data_dir.Trim()
}
[System.IO.File]::WriteAllText((Join-Path $OutDir 'version.txt'), $version)
[System.IO.File]::WriteAllText((Join-Path $OutDir 'doda.txt'), $doda)
if ($sharedDataDir) {
[System.IO.File]::WriteAllText((Join-Path $OutDir 'shareddatadir.txt'), $sharedDataDir)
}
Write-Host "Resolved $CmmId -> PC-DMIS $version, DODA=$doda"
Write-Host " version.txt -> $OutDir\version.txt"
Write-Host " doda.txt -> $OutDir\doda.txt"
Write-Host "Resolved $CmmId -> PC-DMIS $version, DODA=$doda, SharedDataDir=$(if ($sharedDataDir) { $sharedDataDir } else { '(none)' })"
Write-Host " version.txt -> $OutDir\version.txt"
Write-Host " doda.txt -> $OutDir\doda.txt"
if ($sharedDataDir) { Write-Host " shareddatadir.txt -> $OutDir\shareddatadir.txt" }
exit 0