From b91a0a4bb748cb69f84246f46e21ac6314c38c51 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Thu, 9 Apr 2026 14:37:52 -0400 Subject: [PATCH] OpenText: skip WJ_Office, IBM_qks, mmcs .hep profiles Per West Jefferson request, those three connection profiles aren't used on shopfloor PCs and just clutter the HostExplorer session picker. They stay in the bundled source tree (dependencies/opentext/Profile/) for rollback, we just don't copy them into the runtime destinations. Implementation: - New optional Exclude list on $contentMap entries - Copy-HummingbirdContent filters files through Exclude before copying - Also removes any stale excluded files from the destination up-front, so a PC that got them from an older install gets cleaned up on re-deploy (defensive - no production PC has the 15.0.SP1.2 marker yet so this won't actually fire in practice) - NO version bump: 15.0.SP1.2 stays, per explicit request. First imaging run picks up the new logic. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../preinstall/opentext/Setup-OpenText.ps1 | 38 ++++++++++++++++++- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/playbook/preinstall/opentext/Setup-OpenText.ps1 b/playbook/preinstall/opentext/Setup-OpenText.ps1 index 865cbd1..a5ffe24 100644 --- a/playbook/preinstall/opentext/Setup-OpenText.ps1 +++ b/playbook/preinstall/opentext/Setup-OpenText.ps1 @@ -201,9 +201,23 @@ if ($mspExit -ne 0 -and $mspExit -ne 3010) { Write-SetupLog "" Write-SetupLog "Step 3: Deploying profiles/keymaps/menus/macros..." -# Map of source subdir -> destination subdir relative to the Hummingbird root +# Map of source subdir -> destination subdir relative to the Hummingbird root. +# Optional Exclude list drops specific filenames from both the source-to-dest +# copy AND from the destination if they were left over from a prior install. $contentMap = @( - @{ Src = 'Profile'; Dst = 'Profile' } + @{ + Src = 'Profile' + Dst = 'Profile' + # West Jefferson site-specific: these three .hep sessions aren't used + # on shopfloor PCs and just clutter the HostExplorer session picker. + # Leaving the .hep files in the bundled source for rollback, just + # skipping the deploy step. + Exclude = @( + 'WJ_Office.hep', + 'IBM_qks.hep', + 'mmcs.hep' + ) + } @{ Src = 'Accessories\EB'; Dst = 'Accessories\EB' } @{ Src = 'HostExplorer\Keymap'; Dst = 'HostExplorer\Keymap' } @{ Src = 'HostExplorer\Menu'; Dst = 'HostExplorer\Menu' } @@ -219,7 +233,27 @@ function Copy-HummingbirdContent { if (-not (Test-Path $srcPath)) { continue } $dstPath = Join-Path $RootDst $entry.Dst New-Item -Path $dstPath -ItemType Directory -Force | Out-Null + + # Remove any previously-deployed excluded files from the destination + # - handles the case where a PC got them from an older install. + if ($entry.Exclude) { + foreach ($name in $entry.Exclude) { + $stale = Join-Path $dstPath $name + if (Test-Path -LiteralPath $stale) { + try { + Remove-Item -LiteralPath $stale -Force -ErrorAction Stop + Write-SetupLog " $Label : removed stale $name" + } catch { + Write-SetupLog " $Label : failed to remove $stale : $_" + } + } + } + } + $files = Get-ChildItem -Path $srcPath -File -ErrorAction SilentlyContinue + if ($entry.Exclude) { + $files = @($files | Where-Object { $entry.Exclude -notcontains $_.Name }) + } foreach ($f in $files) { Copy-Item -Path $f.FullName -Destination $dstPath -Force }