CMM/DODA: fix DODA-bay profile resolution + goCMM 2.12 DataFolder + settings converter
- Get-PCProfile: subtype-strip fallback. DODA bays set pc-subtype.txt=doda, so the profile key became "gea-shopfloor-cmm-doda" which matched NO profile/alias -> Get-PCProfile returned null -> callers fell to hardcoded defaults (no PC-DMIS desktop icons; Defect Tracker / WJ Shopfloor / Plant Apps force-started). Now an unmatched compound key falls back to the bare pc-type (-> CMM). VM-tested: gea-shopfloor-cmm/doda + CMM/doda resolve to CMM (7 apps, PC-DMIS present); non-CMM unaffected. - 09-Setup-CMM Step 2.5c: Active Setup seed for goCMM 2.12 DataFolder. goCMM 2.12 stores its shared-data-dir in HKCU\Software\General Electric\goCMM\DataFolder (decompiled: RegistrySettings uses Registry.CurrentUser - per-user). Imaging as SupportUser wouldn't reach the ShopFloor operator's HKCU. Active Setup runs the StubPath once per user at first logon -> every user gets DataFolder=C:\geaofi\. VM-tested: StubPath writes the value with the trailing backslash intact. - Convert-goCMMSettings.ps1: converts legacy goCMM 1.1 ApplicationSettings.xml -> goCMM 2.12 goCMMSettings.xml schema. VM-tested: output byte-identical to a real goCMM-2.12-produced CMM10 goCMMSettings.xml. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -113,6 +113,28 @@ if ($siteConfig -and $siteConfig.pcProfiles -and $profileKey) {
|
||||
}
|
||||
}
|
||||
}
|
||||
# Subtype-strip fallback: a compound key like "gea-shopfloor-cmm-doda" (DODA
|
||||
# CMM bays set pc-subtype.txt=doda) has no profile of its own. Fall back to
|
||||
# the BARE pc-type ("gea-shopfloor-cmm" -> "CMM"). Without this the profile
|
||||
# resolves to $null and callers silently use hardcoded defaults (wrong
|
||||
# desktop icons + unwanted startup items).
|
||||
if (-not $pcProfile -and $pcSubtype) {
|
||||
$bare = $pcType
|
||||
$pcProfile = $siteConfig.pcProfiles.$bare
|
||||
if (-not $pcProfile) {
|
||||
foreach ($g in $pcProfileAliasGroups) {
|
||||
if ($g -icontains $bare) {
|
||||
foreach ($alias in $g) {
|
||||
if ($alias -ieq $bare) { continue }
|
||||
$candidate = $siteConfig.pcProfiles.$alias
|
||||
if ($candidate) { $pcProfile = $candidate; break }
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($pcProfile) { $profileKey = $bare }
|
||||
}
|
||||
}
|
||||
|
||||
if ($pcProfile) {
|
||||
|
||||
Reference in New Issue
Block a user