Shopfloor imaging: CMM type, Configure-PC override fix, serial drivers
- CMM imaging pipeline: WinPE-staged bootstrap + on-logon enforcer against tsgwp00525 share, manifest-driven installer runner shared via Install-FromManifest.ps1. Installs PC-DMIS 2016/2019 R2, CLM 1.8, goCMM; enables .NET 3.5 prereq; registers GE CMM Enforce logon task for ongoing version enforcement. - Shopfloor serial drivers: StarTech PCIe serial + Prolific PL2303 USB-to-serial via Install-Drivers.cmd wrapper calling pnputil /add-driver /subdirs /install. Scoped to Standard PCs. - OpenText extended to CMM/Keyence/Genspect/WaxAndTrace via preinstall.json PCTypes; Defect Tracker added to CMM profile desktopApps + taskbarPins. - Configure-PC startup-item toggle now persists across the logon sweep via C:\\ProgramData\\GE\\Shopfloor\\startup-overrides.json; 06-OrganizeDesktop Phase 3 respects suppressed items. - Get-ProfileValue helper added to Shopfloor/lib/Get-PCProfile.ps1; distinguishes explicit empty array from missing key (fixes Lab getting Plant Apps in startup because empty array was falsy). - 06-OrganizeDesktop gains transcript logging at C:\\Logs\\SFLD\\ 06-OrganizeDesktop.log and now deletes the stale Shopfloor Intune Sync task when C:\\Enrollment\\sync-complete.txt is present (task was registered with Limited principal and couldn't self-unregister). - startnet.cmd CMM xcopy block (gated on pc-type=CMM) stages the bundle to W:\\CMM-Install during WinPE. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
46
playbook/preinstall/drivers/Install-Drivers.cmd
Normal file
46
playbook/preinstall/drivers/Install-Drivers.cmd
Normal file
@@ -0,0 +1,46 @@
|
||||
@echo off
|
||||
REM Install-Drivers.cmd - Adds bundled INF driver packages to the Windows driver store
|
||||
REM via pnputil. Runs from C:\PreInstall\installers\drivers\ where each vendor
|
||||
REM subdir (prolific\, startech\) sits alongside this script. /subdirs walks into
|
||||
REM them so one call covers every bundled driver.
|
||||
REM
|
||||
REM Writes C:\ProgramData\PXEDrivers\drivers-installed.marker on success so the
|
||||
REM preinstall runner's File DetectionMethod can skip re-runs.
|
||||
|
||||
setlocal
|
||||
|
||||
set LOGDIR=C:\Logs\PreInstall
|
||||
set LOG=%LOGDIR%\Install-Drivers.log
|
||||
set MARKER_DIR=C:\ProgramData\PXEDrivers
|
||||
set MARKER=%MARKER_DIR%\drivers-installed.marker
|
||||
|
||||
if not exist "%LOGDIR%" mkdir "%LOGDIR%"
|
||||
if not exist "%MARKER_DIR%" mkdir "%MARKER_DIR%"
|
||||
|
||||
echo ================================================================ >> "%LOG%"
|
||||
echo [%date% %time%] Install-Drivers session start >> "%LOG%"
|
||||
echo Source dir: %~dp0 >> "%LOG%"
|
||||
echo ================================================================ >> "%LOG%"
|
||||
|
||||
REM pnputil /add-driver with /subdirs recurses into vendor subdirs. /install
|
||||
REM binds the driver to any matching hardware present now; drivers without a
|
||||
REM matching device still land in the driver store and bind on plug-in later.
|
||||
pnputil.exe /add-driver "%~dp0*.inf" /subdirs /install >> "%LOG%" 2>&1
|
||||
set RC=%ERRORLEVEL%
|
||||
|
||||
echo [%date% %time%] pnputil exit code: %RC% >> "%LOG%"
|
||||
|
||||
REM pnputil exit codes:
|
||||
REM 0 success
|
||||
REM 259 ERROR_NO_MORE_ITEMS - no INFs matched (treat as failure)
|
||||
REM 3010 at least one driver installed, reboot recommended (treat as success)
|
||||
if "%RC%"=="0" goto :ok
|
||||
if "%RC%"=="3010" goto :ok
|
||||
|
||||
echo [%date% %time%] FAILED (exit %RC%) >> "%LOG%"
|
||||
exit /b %RC%
|
||||
|
||||
:ok
|
||||
echo [%date% %time%] SUCCESS >> "%LOG%"
|
||||
echo installed %date% %time% > "%MARKER%"
|
||||
exit /b 0
|
||||
@@ -97,7 +97,7 @@
|
||||
"Type": "EXE",
|
||||
"InstallArgs": "",
|
||||
"LogFile": "C:\\Logs\\PreInstall\\Setup-OpenText.log",
|
||||
"PCTypes": ["Standard"]
|
||||
"PCTypes": ["Standard", "CMM", "Keyence", "Genspect", "WaxAndTrace"]
|
||||
},
|
||||
{
|
||||
"_comment": "UDC_Setup.exe spawns a hidden WPF window (UDC.exe) after install and never exits, so the runner needs KillAfterDetection: true to terminate UDC_Setup.exe + UDC.exe once the registry detection passes. This is an OPT-IN flag - normal installers should NOT set it because killing msiexec mid-install leaves msiserver holding the install mutex and the next msiexec call returns 1618 (Oracle hit this exact bug).",
|
||||
@@ -109,6 +109,17 @@
|
||||
"DetectionMethod": "Registry",
|
||||
"DetectionPath": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\UDC",
|
||||
"PCTypes": ["Standard"]
|
||||
},
|
||||
{
|
||||
"_comment": "Shopfloor Standard serial-port drivers: StarTech PCIe serial adapter (MosChip-based) + Prolific PL2303 USB-to-serial. Install-Drivers.cmd runs pnputil /add-driver with /subdirs /install so every bundled INF under drivers/ lands in the Windows driver store and auto-binds to matching hardware present now or plugged in later. Scoped to Standard PCs (both Machine + Timeclock) because the PCTypes filter is type-level only; installing a serial driver on a Timeclock without the hardware is harmless - it just sits in the driver store.",
|
||||
"Name": "Shopfloor Serial Drivers",
|
||||
"Installer": "drivers\\Install-Drivers.cmd",
|
||||
"Type": "EXE",
|
||||
"InstallArgs": "",
|
||||
"LogFile": "C:\\Logs\\PreInstall\\Install-Drivers.log",
|
||||
"DetectionMethod": "File",
|
||||
"DetectionPath": "C:\\ProgramData\\PXEDrivers\\drivers-installed.marker",
|
||||
"PCTypes": ["Standard"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user