@echo off REM Install-goCMMSettings.bat - restore goCMM settings from a backup zip. REM REM Run AS ADMINISTRATOR / at imaging. Imports the registry pointers + the REM Shared Data Directory and grants the access goCMM needs under lockdown. REM REM Usage: REM Install-goCMMSettings.bat "" REM plain restore REM Install-goCMMSettings.bat "" "\\server\SHARED\CMM\CMM7\Spool" REM restore + override the Selected Part Group (per-bay) REM Install-goCMMSettings.bat "" /replace REM restore + find/replace -> across ALL registry values and REM data files (e.g. legacy FQDN -> new FQDN). Swap the DOMAIN SUFFIX to REM fix every host at once: REM Install-goCMMSettings.bat "bk.zip" /replace rd.ds.ge.com wjs.geaerospace.net setlocal set "HERE=%~dp0" if "%~1"=="" ( echo Usage: echo %~nx0 "^" echo %~nx0 "^" "^" echo %~nx0 "^" /replace ^ ^ pause exit /b 1 ) set "ZIP=%~1" set "PS=powershell.exe -NoProfile -ExecutionPolicy Bypass -File ""%HERE%Install-goCMMSettings.ps1"" -BackupPath ""%ZIP%""" if /i "%~2"=="/replace" ( if "%~4"=="" ( echo /replace needs ^ ^ & pause & exit /b 1 ) %PS% -ReplaceFrom "%~3" -ReplaceTo "%~4" ) else if not "%~2"=="" ( %PS% -SelectedPartGroup "%~2" ) else ( %PS% ) echo. pause