Initial commit: Organized PowerShell scripts for ShopDB asset collection
Structure: - asset-collection/: Local PC data collection scripts - remote-execution/: WinRM remote execution scripts - setup-utilities/: Configuration and testing utilities - registry-backup/: GE registry backup scripts - winrm-https/: WinRM HTTPS certificate setup - docs/: Complete documentation Each folder includes a README with detailed documentation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
67
registry-backup/Backup-GERegistry.bat
Normal file
67
registry-backup/Backup-GERegistry.bat
Normal file
@@ -0,0 +1,67 @@
|
||||
@echo off
|
||||
REM Backup-GERegistry.bat - Wrapper for GE Aircraft Engines registry backup
|
||||
REM Backs up both 32-bit and 64-bit registry locations to S:\dt\adata\script\backup
|
||||
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
echo.
|
||||
echo ===============================================
|
||||
echo GE Aircraft Engines Registry Backup
|
||||
echo ===============================================
|
||||
echo.
|
||||
|
||||
REM Check if running as administrator
|
||||
net session >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo [WARNING] Not running as administrator.
|
||||
echo Registry backup may have limited access.
|
||||
echo.
|
||||
)
|
||||
|
||||
REM Set default backup path
|
||||
set "BACKUP_PATH=S:\dt\adata\script\backup"
|
||||
|
||||
REM Check if custom path provided
|
||||
if not "%~1"=="" (
|
||||
set "BACKUP_PATH=%~1"
|
||||
echo Using custom backup path: %BACKUP_PATH%
|
||||
) else (
|
||||
echo Using default backup path: %BACKUP_PATH%
|
||||
)
|
||||
|
||||
REM Create backup directory if it doesn't exist
|
||||
if not exist "%BACKUP_PATH%" (
|
||||
echo Creating backup directory...
|
||||
mkdir "%BACKUP_PATH%" 2>nul
|
||||
if errorlevel 1 (
|
||||
echo [ERROR] Failed to create backup directory
|
||||
echo Please ensure S: drive is mapped and accessible
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
REM Run the PowerShell script
|
||||
echo.
|
||||
echo Starting registry backup...
|
||||
echo -----------------------------------------------
|
||||
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0Backup-GERegistry.ps1" -BackupPath "%BACKUP_PATH%"
|
||||
|
||||
set RESULT=%ERRORLEVEL%
|
||||
|
||||
echo -----------------------------------------------
|
||||
echo.
|
||||
|
||||
if %RESULT% equ 0 (
|
||||
echo [SUCCESS] Registry backup completed successfully
|
||||
echo Check the backup folder: %BACKUP_PATH%
|
||||
) else (
|
||||
echo [INFO] No GE Aircraft Engines registry keys found or backup failed
|
||||
echo This may be normal if GE software is not installed
|
||||
)
|
||||
|
||||
echo.
|
||||
echo Press any key to exit...
|
||||
pause >nul
|
||||
exit /b %RESULT%
|
||||
Reference in New Issue
Block a user