Sixteen files that run on every shopfloor PC existed only on the SFLD share. The cost showed up while debugging the NTLARS backup: the script that posts to ShopDB could not be read, reviewed or diffed, so its behaviour was inferred from log output for most of a day. It turned out to hold a silent fallback that had been governing the whole fleet for months. Imported as-is from tsgwp00525-v2, no edits: lib/ShopdbBackupClient.psm1 the shared backup client scripts/Backup-NtlarsSettings.ps1 converted to use it scripts/Set-ShopdbCollectorKey.ps1 collector credential delivery scripts/Test-RegExport.ps1 exercises the .reg codec with mocks scripts/Set-EventSaver*.ps1 kiosk power / screensaver / disable scripts/Setup-OpenText.* OpenText install + toolbar scripts/Migrate-PCType.ps1, Select-KioskType.ps1, Set-FmsHostsEntry.ps1, scripts/ensure-vnc-firewall.ps1, Install-AcroReader.cmd, Install-Oracle11r2.cmd lib/Install-FromManifest.ps1 is also updated from the share, which was 37 lines AHEAD of this repo and purely additive: the Add-EnforceResult reporting added during the kiosk API cutover, done live and never committed back. Nothing was removed. Checked for embedded secrets before committing; there are none. Set-ShopdbCollectorKey deliberately reads its token from a sibling file on the share rather than holding it, so the script is safe to track. The share remains what actually runs. This makes it reviewable, and makes the next drift visible as a diff rather than a surprise.
76 lines
2.6 KiB
Batchfile
Executable File
76 lines
2.6 KiB
Batchfile
Executable File
@echo off
|
|
REM Install-Oracle11r2.cmd
|
|
REM Expands the GE Oracle Client 11.2 Administrator zip to a temp dir and
|
|
REM runs Oracle Universal Installer silently with the GE-customized
|
|
REM response file.
|
|
REM
|
|
REM Expected layout on the SFLD share (relative to this .cmd):
|
|
REM ..\apps\Oracle_OracleDatabase_11r2_V03.zip (686 MB)
|
|
REM
|
|
REM Called by Install-FromManifest.ps1 (Type=CMD). Exit codes surface back
|
|
REM to the enforcer.
|
|
REM
|
|
REM Oracle 11.2 OUI exit codes worth knowing:
|
|
REM 0 = success
|
|
REM 3 = success but with warnings
|
|
REM 1 = general failure
|
|
REM 6 = silent install requested but missing / bad response file
|
|
|
|
setlocal enabledelayedexpansion
|
|
set "LOG=C:\Logs\OracleClient\install.log"
|
|
if not exist "C:\Logs\OracleClient" mkdir "C:\Logs\OracleClient"
|
|
|
|
REM Emit a datestamp
|
|
for /f "tokens=2 delims==" %%I in ('wmic os get localdatetime /value 2^>nul ^| find "="') do set LDT=%%I
|
|
set "STAMP=!LDT:~0,14!"
|
|
|
|
echo [%STAMP%] Install-Oracle11r2.cmd starting >> "%LOG%"
|
|
|
|
set "SRC_ZIP=%~dp0..\apps\Oracle_OracleDatabase_11r2_V03.zip"
|
|
set "STAGING=%TEMP%\oracle-11r2-install"
|
|
set "CLIENT_DIR=%STAGING%\Oracle_OracleDatabase_11r2_V03\client"
|
|
set "RSP=%CLIENT_DIR%\response\ge_client_install.rsp"
|
|
|
|
if not exist "%SRC_ZIP%" (
|
|
echo [%STAMP%] ERROR: zip not found at %SRC_ZIP% >> "%LOG%"
|
|
echo ERROR: zip not found at %SRC_ZIP%
|
|
exit /b 2
|
|
)
|
|
|
|
echo [%STAMP%] Expanding %SRC_ZIP% to %STAGING% >> "%LOG%"
|
|
if exist "%STAGING%" rmdir /s /q "%STAGING%" >nul 2>&1
|
|
mkdir "%STAGING%"
|
|
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command ^
|
|
"try { Expand-Archive -Path '%SRC_ZIP%' -DestinationPath '%STAGING%' -Force -ErrorAction Stop; exit 0 } catch { Write-Error $_; exit 1 }" ^
|
|
>> "%LOG%" 2>&1
|
|
|
|
if not exist "%CLIENT_DIR%\setup.exe" (
|
|
echo [%STAMP%] ERROR: expanded setup.exe not found at %CLIENT_DIR%\setup.exe >> "%LOG%"
|
|
exit /b 3
|
|
)
|
|
|
|
if not exist "%RSP%" (
|
|
echo [%STAMP%] ERROR: response file missing at %RSP% >> "%LOG%"
|
|
exit /b 4
|
|
)
|
|
|
|
echo [%STAMP%] Running OUI silent install (this takes 2-8 minutes) >> "%LOG%"
|
|
"%CLIENT_DIR%\setup.exe" -silent -waitforcompletion -nowait ^
|
|
-ignoreSysPrereqs ^
|
|
-responseFile "%RSP%" >> "%LOG%" 2>&1
|
|
set RC=%ERRORLEVEL%
|
|
|
|
echo [%STAMP%] OUI exit code: %RC% >> "%LOG%"
|
|
|
|
REM Cleanup staging dir to reclaim ~1.5 GB - OUI copies everything to ORACLE_HOME
|
|
echo [%STAMP%] Cleaning up staging dir >> "%LOG%"
|
|
rmdir /s /q "%STAGING%" >nul 2>&1
|
|
|
|
REM OUI returns 0 for success, 3 for success-with-warnings. Treat both as OK.
|
|
if %RC%==3 (
|
|
echo [%STAMP%] OUI reported warnings but install succeeded - returning 0 >> "%LOG%"
|
|
exit /b 0
|
|
)
|
|
|
|
exit /b %RC%
|