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:
@@ -87,19 +87,51 @@ echo 3. Keyence
|
||||
echo 4. Genspect
|
||||
echo 5. Display
|
||||
echo 6. Standard
|
||||
echo 7. Lab
|
||||
echo.
|
||||
set PCTYPE=
|
||||
set /p pctype_choice=Enter your choice (1-6):
|
||||
set /p pctype_choice=Enter your choice (1-7):
|
||||
if "%pctype_choice%"=="1" set PCTYPE=CMM
|
||||
if "%pctype_choice%"=="2" set PCTYPE=WaxAndTrace
|
||||
if "%pctype_choice%"=="3" set PCTYPE=Keyence
|
||||
if "%pctype_choice%"=="4" set PCTYPE=Genspect
|
||||
if "%pctype_choice%"=="5" set PCTYPE=Display
|
||||
if "%pctype_choice%"=="6" set PCTYPE=Standard
|
||||
if "%pctype_choice%"=="7" set PCTYPE=Lab
|
||||
if "%PCTYPE%"=="" goto pctype_menu
|
||||
|
||||
REM --- Display sub-type selection ---
|
||||
REM --- Sub-type selection menus ---
|
||||
REM PCSUBTYPE is written to pc-subtype.txt alongside pc-type.txt.
|
||||
REM Scripts read it to look up the right profile in site-config.json.
|
||||
set PCSUBTYPE=
|
||||
set DISPLAYTYPE=
|
||||
|
||||
REM --- Standard sub-type ---
|
||||
if not "%PCTYPE%"=="Standard" goto skip_standard_menu
|
||||
:standard_menu
|
||||
cls
|
||||
echo.
|
||||
echo ========================================
|
||||
echo Standard PC Sub-Type
|
||||
echo ========================================
|
||||
echo.
|
||||
echo 1. Timeclock (WJ Shopfloor only)
|
||||
echo 2. Machine (WJ Shopfloor, Plant Apps, eDNC, UDC)
|
||||
echo.
|
||||
set /p standard_choice=Enter your choice (1-2):
|
||||
if "%standard_choice%"=="1" set PCSUBTYPE=Timeclock
|
||||
if "%standard_choice%"=="2" set PCSUBTYPE=Machine
|
||||
if "%PCSUBTYPE%"=="" goto standard_menu
|
||||
|
||||
REM --- Machine number (Standard only) ---
|
||||
set MACHINENUM=9999
|
||||
echo.
|
||||
set /p MACHINENUM=Enter machine number (digits, or Enter for 9999):
|
||||
if "%MACHINENUM%"=="" set MACHINENUM=9999
|
||||
echo Machine number: %MACHINENUM%
|
||||
:skip_standard_menu
|
||||
|
||||
REM --- Display sub-type ---
|
||||
if not "%PCTYPE%"=="Display" goto skip_display_menu
|
||||
:display_menu
|
||||
cls
|
||||
@@ -113,8 +145,10 @@ echo 2. Dashboard
|
||||
echo.
|
||||
set /p display_choice=Enter your choice (1-2):
|
||||
if "%display_choice%"=="1" set DISPLAYTYPE=Lobby
|
||||
if "%display_choice%"=="1" set PCSUBTYPE=Lobby
|
||||
if "%display_choice%"=="2" set DISPLAYTYPE=Dashboard
|
||||
if "%DISPLAYTYPE%"=="" goto display_menu
|
||||
if "%display_choice%"=="2" set PCSUBTYPE=Dashboard
|
||||
if "%PCSUBTYPE%"=="" goto display_menu
|
||||
:skip_display_menu
|
||||
|
||||
REM --- Map enrollment share early (kept open for copy after imaging) ---
|
||||
@@ -216,6 +250,14 @@ if not exist W:\Windows\System32\config\system goto wait_enroll
|
||||
echo Found Windows at W:
|
||||
mkdir W:\Enrollment 2>NUL
|
||||
|
||||
REM --- Copy site config (drives site-specific values in all setup scripts) ---
|
||||
if exist "Y:\site-config.json" (
|
||||
copy /Y "Y:\site-config.json" "W:\Enrollment\site-config.json"
|
||||
echo Copied site-config.json.
|
||||
) else (
|
||||
echo WARNING: site-config.json not found on enrollment share.
|
||||
)
|
||||
|
||||
REM --- Copy PPKG if selected ---
|
||||
if "%PPKG%"=="" goto copy_pctype
|
||||
copy /Y "Y:\%PPKG%" "W:\Enrollment\%PPKG%"
|
||||
@@ -223,7 +265,7 @@ if errorlevel 1 (
|
||||
echo WARNING: Failed to copy enrollment package.
|
||||
goto copy_pctype
|
||||
)
|
||||
copy /Y "Y:\run-enrollment.ps1" "W:\run-enrollment.ps1"
|
||||
copy /Y "Y:\run-enrollment.ps1" "W:\Enrollment\run-enrollment.ps1"
|
||||
|
||||
REM --- Create enroll.cmd at drive root as manual fallback ---
|
||||
> W:\enroll.cmd (
|
||||
@@ -242,6 +284,8 @@ REM --- Copy shopfloor PC type setup scripts ---
|
||||
if "%PCTYPE%"=="" goto cleanup_enroll
|
||||
echo %PCTYPE%> W:\Enrollment\pc-type.txt
|
||||
if not "%DISPLAYTYPE%"=="" echo %DISPLAYTYPE%> W:\Enrollment\display-type.txt
|
||||
if not "%PCSUBTYPE%"=="" echo %PCSUBTYPE%> W:\Enrollment\pc-subtype.txt
|
||||
if not "%MACHINENUM%"=="" echo %MACHINENUM%> W:\Enrollment\machine-number.txt
|
||||
copy /Y "Y:\shopfloor-setup\Run-ShopfloorSetup.ps1" "W:\Enrollment\Run-ShopfloorSetup.ps1"
|
||||
REM --- Always copy Shopfloor baseline scripts ---
|
||||
mkdir W:\Enrollment\shopfloor-setup 2>NUL
|
||||
@@ -274,6 +318,23 @@ if exist "Y:\preinstall\preinstall.json" (
|
||||
) else (
|
||||
echo No preinstall bundle on PXE server - skipping.
|
||||
)
|
||||
|
||||
REM --- Stage CMM bootstrap bundle (CMM-type PCs only) ---
|
||||
REM Copies the Hexagon installer bundle (~1.9 GB) from the PXE server enrollment
|
||||
REM share onto the target disk so 01-Setup-CMM.ps1 can install from local disk.
|
||||
REM The tsgwp00525 SFLD share that holds the canonical copy is not yet reachable
|
||||
REM during shopfloor-setup (Azure DSC provisions those creds later), so this
|
||||
REM bootstrap exists to get the first-install through. Post-imaging, the logon-
|
||||
REM triggered CMM-Enforce.ps1 takes over from the share.
|
||||
if /i not "%PCTYPE%"=="CMM" goto skip_cmm_stage
|
||||
if exist "Y:\cmm-installers\cmm-manifest.json" (
|
||||
mkdir W:\CMM-Install 2>NUL
|
||||
xcopy /E /Y /I "Y:\cmm-installers" "W:\CMM-Install\"
|
||||
echo Staged CMM bootstrap to W:\CMM-Install.
|
||||
) else (
|
||||
echo WARNING: Y:\cmm-installers not found - CMM PC cannot install Hexagon apps at imaging time.
|
||||
)
|
||||
:skip_cmm_stage
|
||||
:pctype_done
|
||||
|
||||
:cleanup_enroll
|
||||
|
||||
Reference in New Issue
Block a user