Shopfloor images: add Wax/Trace + Keyence per-model variants

Wax/Trace (gea-shopfloor-waxtrace):
- captured/ holds master FormTracePak v6.0 state (Program Files reg dump
  gzipped, ARP entries) taken from a win11 VM where the CD-ROM-bound VB6
  wrapper was driven to completion. xcopy + reg-import replays the install
  on real bays without running the wrapper itself.
- 09-Setup-WaxAndTrace.ps1 rewrites the stub: installs prereqs via manifest
  (VC++ 2008/2017 x86+x64, Sentinel HASP), expands the captured zips into
  C:\Program Files (x86)\MitutoyoApp + C:\MitutoyoApp, imports the reg
  hive, then mounts the bay's per-machine cal ISO (matched by asset tag
  in machine-number.txt) and runs its Setup.exe.
- waxtrace-manifest.json lists the 5 prereqs with InstallShield-style
  silent flags verified on the win11 VM.
- sync-waxtrace.sh ships captured-binary/ + prereqs + cal ISOs from
  /home/camp/pxe-images/iso/mitutoyo-cal/ to
  /srv/samba/enrollment/installers-post/waxtrace/ on the PXE box.
- select-waxtrace-asset.ps1 arrow-key bay picker for WinPE (parses
  INDEX.csv from the cal share, offers "Other (new bay)" fallback).
- startnet.cmd: prompt_waxtrace_asset prompt, skip_waxtrace_stage xcopy
  block (mirrors :skip_cmm_stage), machine-number.txt write covers bay
  asset tag (WJRP*).

Keyence (gea-shopfloor-keyence) - now multi-model:
- vr3000/manifest.json + vr5000/manifest.json + vr6000/manifest.json
  (current single-model VR-6000 moved into vr6000/ subdir). Each ships
  the model's MSI silent-install + DetectionPath via ProductCode.
  Big payloads (Data1.cab, Data11.cab) gitignored, staged via
  sync-keyence.sh from /home/camp/pxe-images/iso/keyence/.
- 09-Setup-Keyence.ps1 dispatches by C:\Enrollment\keyence-model.txt
  (written by startnet.cmd in :keyence_submenu) and points
  InstallerRoot at C:\KeyenceInstall\<model>. DXSETUP probe widened
  to all three Program Files paths (VR-3000 G2, VR-5000, VR-6000).
- startnet.cmd: :keyence_submenu picks vr3000/vr5000/vr6000,
  :skip_keyence_stage xcopy block selectively stages chosen model bundle,
  pc-subtype.txt also written = drops directly into existing GE-Enforce
  PCSubType wiring (looks for gea-shopfloor-keyence-<model>\manifest.json
  on the tsgwp00525 share for ongoing enforcement, no dispatcher change
  needed).
- sync-keyence.sh mirrors sync-waxtrace.sh pattern.

Verified silent MSI install for VR-3000 G2 v2.5.0 and VR-5000 v3.3.1 on
the win11 VM 2026-05-18 with /qn /norestart ALLUSERS=1 REBOOT=ReallySuppress
TRANSFORMS=1033.mst. boot.wim on 172.16.9.1 wimupdate'd with the new
startnet.cmd.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
cproudlock
2026-05-18 16:34:20 -04:00
parent 3aabd47571
commit 37357eee43
25 changed files with 1061 additions and 33 deletions

View File

@@ -1,15 +1,18 @@
# 09-Setup-Keyence.ps1 - Keyence type setup (runs during shopfloor-setup phase).
#
# Performs the imaging-time install of Keyence VR-6000 Series Software MSI +
# KEYENCE VR Series USB driver from the staged bundle. Ongoing enforcement
# is handled by GE-Enforce (registered separately in Run-ShopfloorSetup.ps1)
# reading keyence/manifest.json from the tsgwp00525 share.
# Performs the imaging-time install of one of three Keyence model variants:
# VR-3000 G2 / VR-5000 / VR-6000
# based on C:\Enrollment\keyence-model.txt (vr3000 / vr5000 / vr6000), set
# during the WinPE menu. Per-model manifest + installers live at
# <model>/manifest.json + <model>/installers/. Ongoing enforcement is handled
# by GE-Enforce reading keyence/manifest.json from the tsgwp00525 share.
#
# Layout at $PSScriptRoot (xcopied by startnet.cmd only for PCTYPE=Keyence):
# keyence-manifest.json
# 09-Setup-Keyence.ps1 (this file)
# installers\VR-6000 Series Software.msi
# drivers\keyence_vr_series.inf (+ cat + amd64\{Wdf,WinUsb}CoInstaller*.dll)
# vr3000\manifest.json + installers\VR-3000 G2 Series Software.msi + Data*.cab
# vr5000\manifest.json + installers\VR-5000 Series Software.msi + Data1.cab
# vr6000\manifest.json + installers\VR-6000 Series Software.msi + Data1.cab
# + drivers\keyence_vr_series.inf (legacy - only VR-6000)
#
# Library lookup: the imaging-time install uses the common Install-FromManifest
# library at ..\common\lib\Install-FromManifest.ps1 (relative to $PSScriptRoot).
@@ -19,8 +22,26 @@
$ErrorActionPreference = 'Continue'
$manifestPath = Join-Path $PSScriptRoot 'keyence-manifest.json'
$libSource = Join-Path $PSScriptRoot '..\common\lib\Install-FromManifest.ps1'
$libSource = Join-Path $PSScriptRoot '..\common\lib\Install-FromManifest.ps1'
# Resolve which Keyence model variant to install. WinPE writes the choice
# (vr3000 / vr5000 / vr6000) into C:\Enrollment\keyence-model.txt during
# the imaging menu. If the file is missing, default to vr6000 since that
# was the original single-model setup before this refactor.
$modelFile = 'C:\Enrollment\keyence-model.txt'
if (Test-Path -LiteralPath $modelFile) {
$model = (Get-Content -LiteralPath $modelFile -First 1 -ErrorAction SilentlyContinue).Trim().ToLower()
}
if (-not $model) { $model = 'vr6000' }
# Manifest comes via shopfloor-setup tree xcopy (small file, git-tracked).
# Installer payload (MSI + Data*.cab) comes via installers-post stage at
# C:\KeyenceInstall\<model>\ - placed there by startnet.cmd's keyence-stage
# block. So manifest paths reference installers\... which resolve relative
# to InstallerRoot=C:\KeyenceInstall\<model>.
$modelRoot = Join-Path $PSScriptRoot $model
$manifestPath = Join-Path $modelRoot 'manifest.json'
$stagingRoot = "C:\KeyenceInstall\$model"
$logDir = 'C:\Logs\Keyence'
$installLog = Join-Path $logDir 'install.log'
@@ -80,8 +101,11 @@ foreach ($file in @('pc-type.txt','pc-subtype.txt','machine-number.txt')) {
# If either step fails, log + continue - the MSI is still expected to install
# successfully; the only fallout is the GUI prompt the operator would have
# had to click through anyway.
$driverInf = Join-Path $PSScriptRoot 'drivers\keyence_vr_series.inf'
$driverCat = Join-Path $PSScriptRoot 'drivers\KEYENCE_VR_SERIES.cat'
# Drivers come via the staging dir now. Only VR-6000 ships an external .inf;
# VR-3000 + VR-5000 embed drivers inside the MSI so the pre-stage step is a
# no-op for those models (no file found, log + continue).
$driverInf = Join-Path $stagingRoot 'drivers\keyence_vr_series.inf'
$driverCat = Join-Path $stagingRoot 'drivers\KEYENCE_VR_SERIES.cat'
if (Test-Path -LiteralPath $driverInf) {
Write-KeyenceLog "Pre-staging USB driver via pnputil (suppresses dpinst GUI inside MSI)"
@@ -124,8 +148,8 @@ if (-not (Test-Path $manifestPath)) {
} elseif (-not (Test-Path $libSource)) {
Write-KeyenceLog "Install-FromManifest.ps1 not found at $libSource" "ERROR"
} else {
Write-KeyenceLog "Running Install-FromManifest (InstallerRoot=$PSScriptRoot)"
& $libSource -ManifestPath $manifestPath -InstallerRoot $PSScriptRoot -LogFile $installLog
Write-KeyenceLog "Running Install-FromManifest (InstallerRoot=$stagingRoot)"
& $libSource -ManifestPath $manifestPath -InstallerRoot $stagingRoot -LogFile $installLog
$rc = $LASTEXITCODE
Write-KeyenceLog "Install-FromManifest returned $rc"
}
@@ -138,11 +162,15 @@ if (-not (Test-Path $manifestPath)) {
# the application is not installed correctly. Install from the following
# folder: C:\Program Files\Keyence\VR-6000\Common\DirectX End-User Runtimes\
# DXSETUP.exe". Run it silently here; /silent suppresses all UI + reboot.
$dxSetup = 'C:\Program Files\KEYENCE\VR-6000\Common\DirectX End-User Runtimes\DXSETUP.exe'
$dxSetupAlt = 'C:\Program Files (x86)\KEYENCE\VR-6000\Common\DirectX End-User Runtimes\DXSETUP.exe'
if (Test-Path -LiteralPath $dxSetup) { $dxPath = $dxSetup }
elseif (Test-Path -LiteralPath $dxSetupAlt) { $dxPath = $dxSetupAlt }
else { $dxPath = $null }
# Probe both VR-3000 G2, VR-5000, VR-6000 install paths under both Program Files
# roots. Whichever model's MSI installed will have its DXSETUP at one of these.
$dxCandidates = @()
foreach ($pf in @('C:\Program Files\KEYENCE','C:\Program Files (x86)\KEYENCE')) {
foreach ($prod in @('VR-3000 G2','VR-5000','VR-6000')) {
$dxCandidates += (Join-Path $pf "$prod\Common\DirectX End-User Runtimes\DXSETUP.exe")
}
}
$dxPath = $dxCandidates | Where-Object { Test-Path -LiteralPath $_ } | Select-Object -First 1
if ($dxPath) {
Write-KeyenceLog "Running DirectX End-User Runtimes: $dxPath /silent"

View File

@@ -0,0 +1,17 @@
{
"Version": "1.0",
"_comment": "Keyence VR-3000 G2 imaging-time manifest. Consumed by 09-Setup-Keyence.ps1 when keyence-model.txt = vr3000. USB drivers are embedded in the MSI (newer InstallShield deploys them via custom action) - no separate .inf needed. The MSI references Data1.cab (2.0 GB) + Data11.cab (388 MB) in the same Installer\\ dir; those cabs are gitignored (see .gitignore). Stage them from /home/camp/pxe-images/iso/keyence/Keyence-VR-3000-G2-v2.5.0.iso (Installer/Data*.cab) into installers/ before sync-keyence.sh. Verified silent install via msiexec on Win11 2026-05-18 with /qn /norestart ALLUSERS=1 REBOOT=ReallySuppress TRANSFORMS=1033.mst (English transform).",
"Applications": [
{
"_comment": "VR-3000 G2 Series Software. v2.5.0 Sept 2017. ProductCode {9CC9A062-2A93-4D3B-AECA-F70C691A46F2}. The bundled InstallShield setup.exe wrapper is 227 MB and bundles its own VC++/DotNet prereqs; we skip it and call the MSI directly via msiexec since modern Win11 ships compatible runtimes.",
"Name": "VR-3000 G2 Series Software",
"Installer": "installers\\VR-3000 G2 Series Software.msi",
"Type": "MSI",
"InstallArgs": "/qn /norestart ALLUSERS=1 REBOOT=ReallySuppress TRANSFORMS=installers\\1033.mst",
"DetectionMethod": "Registry",
"DetectionPath": "HKLM:\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{9CC9A062-2A93-4D3B-AECA-F70C691A46F2}",
"DetectionName": "DisplayVersion",
"DetectionValue": "2.5.0"
}
]
}

View File

@@ -0,0 +1,17 @@
{
"Version": "1.0",
"_comment": "Keyence VR-5000 imaging-time manifest. Consumed by 09-Setup-Keyence.ps1 when keyence-model.txt = vr5000. USB drivers embedded in MSI (newer InstallShield). MSI references Data1.cab (702 MB) in installers/ - gitignored, stage from /home/camp/pxe-images/iso/keyence/Keyence-VR-5000-v3.3.1.iso. Verified silent install via msiexec on Win11 2026-05-18.",
"Applications": [
{
"_comment": "VR-5000 Series Software v3.3.1 Nov 2018. ProductCode {AF7E8B93-DBEB-4DB1-91CB-4DA592D8E222}. Same bypass-bootstrapper pattern: call MSI directly skipping the InstallShield setup.exe (203 MB - prereq bundle we don't need).",
"Name": "VR-5000 Series Software",
"Installer": "installers\\VR-5000 Series Software.msi",
"Type": "MSI",
"InstallArgs": "/qn /norestart ALLUSERS=1 REBOOT=ReallySuppress TRANSFORMS=installers\\1033.mst",
"DetectionMethod": "Registry",
"DetectionPath": "HKLM:\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{AF7E8B93-DBEB-4DB1-91CB-4DA592D8E222}",
"DetectionName": "DisplayVersion",
"DetectionValue": "3.3.1"
}
]
}