CMM: add PC-DMIS + combined CMM backup/restore + diagnostic scripts
Adds the PC-DMIS settings/probe backup-restore set alongside the existing goCMM scripts, plus a single combined CMM backup and the diagnostics built while debugging the live bays: - Backup-PCDMISSettings / Install-PCDMISSettings: capture+restore PC-DMIS registry + data/probe/cal files per installed version (2016/2019/2026). Hardened from real-bay failures: detect install dir via Program Files fallback; capture compens.dat (not just comp.dat) + interfac.dll; identify the controller by hash-matching interfac.dll to its source DLL AND reading the PE OriginalFilename (covers rename-without-copy); EXCLUDE the whole Homepage state (Recent/Favorites/DetailsView) which null-refs PC-DMIS on launch via stale routine paths; restore routes HKCU into the target user's hive (-TargetUser ShopFloor), fails loud on a non-backup path, and applies the legacy->new FQDN rewrite across reg + data files incl .bas. - Backup-CMM: one wrapper running goCMM + PC-DMIS (all versions) into one per-CMM folder + index, for staging on PXE and restore-by-machine-number. - Clear-PCDMISRecent: fixes the Homepage recent-list NullReferenceException crash on an already-broken bay. - pcdmis-probe-debug / Export-PCDMISCrashEvents: diagnostics for the custom-probe-not-showing and crash investigations. - Modify-PCDMISRights / Grant-FullControl: grant the operator the registry + filesystem access PC-DMIS needs under lockdown. - Install-goCMMSettings: add .bas to the FQDN-rewrite include list. Not yet wired into 09-Setup-CMM auto-restore - staging + the gated restore block come next. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
@echo off
|
||||
REM Install-PCDMISSettings.bat - restore a PC-DMIS backup (SAME version).
|
||||
REM
|
||||
REM Run AS ADMINISTRATOR / at imaging. Imports the registry hive + data/probe
|
||||
REM files, grants the operator write on the data dir, and auto-applies the
|
||||
REM legacy->new FQDN rewrite (rd.ds.ge.com -> wjs.geaerospace.net).
|
||||
REM
|
||||
REM Install-PCDMISSettings.bat "<zip>"
|
||||
REM Install-PCDMISSettings.bat "<zip>" /replace <from> <to>
|
||||
REM
|
||||
REM CROSS-VERSION upgrade (e.g. 2016 backup -> 2026 bay): do NOT use this -
|
||||
REM use the 2026 Settings Editor IMPORT feature, which remaps the older layout.
|
||||
REM This script does a verbatim same-version restore.
|
||||
|
||||
setlocal
|
||||
set "HERE=%~dp0"
|
||||
if "%~1"=="" (
|
||||
echo Usage: %~nx0 "^<zip^>" [/replace ^<from^> ^<to^>]
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
set "ZIP=%~1"
|
||||
set "PS=powershell.exe -NoProfile -ExecutionPolicy Bypass -File ""%HERE%Install-PCDMISSettings.ps1"" -BackupPath ""%ZIP%"""
|
||||
|
||||
if /i "%~2"=="/replace" (
|
||||
if "%~4"=="" ( echo /replace needs ^<from^> ^<to^> & pause & exit /b 1 )
|
||||
%PS% -ReplaceFrom "%~3" -ReplaceTo "%~4"
|
||||
) else (
|
||||
%PS%
|
||||
)
|
||||
echo.
|
||||
pause
|
||||
Reference in New Issue
Block a user