PRIMS/CITS Pro PC Build Automation
Automated, repeatable build of a PRIMS/CITS Pro machine-HMI PC at the bench — replaces the manual co-op OneNote procedure (“PC Setup Part 1/2/3”) with a one-command USB build, a hands-off OOBE installer, post-build validation, and a lifecycle path for backing up / migrating existing machine PCs.
Repo: ProgressiveSurface/psi-pc-setup · Runs from the Co-op share: \\ad.ptihome.com\DFS\Data\Dept\Eng\Controls\Co-op\PsiPcSetup\
What it is
Every PRIMS/CITS Pro machine ships with a Windows HMI PC (a factory Dell). Historically a co-op built each one by hand from a long OneNote guide and three “PC Setup Part 1/2/3” PowerShell scripts — clicking through ~30 interactive installers across multiple reboots, then handing off for a manual double-check.
This tooling automates that end-to-end: derive everything from the project number, stage a USB, boot the Dell, and let it configure itself — OS settings, debloat, silent app installs (SQL, SSMS, Adobe, Access, K-Lite, eDrawings, Macrium, TeamViewer), static IP, PRIMS install + database restore, auto-login to PRIMS — ending with an operator punch-list (the genuinely physical items) and a birth certificate validating the result.
Status: bench-validated on Win11 24H2 (PC2245); in pilot. Core flow works; remaining work is confirming a few silent-install switches and fleet-DB wiring.
Two environments
The design splits in two because the bench PC is offline from corp DFS (a fresh, non-domain machine can’t reach \\ad.ptihome.com\DFS\):
| Where | Network | Does | |
|---|---|---|---|
| Stage | a domain workstation | reaches S: + K: | builds the USB — derives the manifest, pulls the right installer versions from S:, stages the USB |
| Build | the bench Dell | offline from DFS (needs plain internet) | runs entirely from the USB |
The USB carries the payload because the bench can’t reach the shares. It still needs plain internet (Windows/Dell updates, Adobe, TeamViewer) — only corp DFS is unreachable.
Build a PC
- Stage (on a workstation): launch the GUI from the share —
\\ad.ptihome.com\DFS\Data\Dept\Eng\Controls\Co-op\PsiPcSetup\Build-PsiPcUsb.cmd. Type the project number, pick the USB, hit Build. It derives PRIMS/SQL/eDrawings versions fromK:\PROJECT\<proj>, pulls the matching installers from S:, and stages the USB with a live progress bar. (Re-staging an already-used USB only copies what changed.) - Boot the new Dell from its factory OEM image with the USB in (and ethernet for internet).
- At the OOBE language screen, press
Shift+F10and run<USB>\bootstrap.cmd. Windows 11 24H2 no longer auto-applies an answer file from USB, so the bootstrap forces it (sysprep /oobe /reboot /unattend:<USB>\autounattend.xml). The PC reboots, creates the PTI account, names itselfPC<proj>, auto-logs in, and the installer runs itself. - Finish the short operator punch-list (UPS, labels, cabling, drivers needing connected hardware) and read the birth certificate (
%ProgramData%\PsiPcSetup\birth-certificate.txt).
Full operator walkthrough: docs/how-to-build-a-pc.md in the repo.
How it stays current
config/source-map.psd1 is the editable source of truth for where each installer is pulled from — the canonical, version-organized tree S:\Dept\Eng\Controls\Apps\Prims Pro\Installation\<PRIMS-year>\. To fix a moved/renamed installer, edit one line — no code.
Distribution is CI/CD: every merge to main runs publish-to-share.yml on the on-prem PS-GR-RUNNER and mirrors the tooling to the Co-op share. The share is a published copy of canonical GHE — it can’t drift. The current build number shows in the GUI title (from VERSION.txt).
Validation (birth certificate)
Test-PsiPcBuild.ps1 checks a built PC against its manifest — OS config, login/autologon, static IP, services, installs, the PRIMS layer (DB restored, shell set), and runtime (PRIMS actually running). It runs automatically at the end of a build and can be re-run standalone after reboot. Output: birth-certificate.txt (human) + .json (fleet-ready). This replaces the manual “eyeball it” QA.
Lifecycle — backing up / replacing an existing PC
A machine PC runs for 5–15 years at a customer site; its irreplaceable state (SQL database, part programs, process documents, config) lives only on that box. A Macrium full-disk image is the wrong tool for migration to new hardware (hardware-bound, opaque, stale OS).
Instead, the personality capsule is the portable unit:
Export-PsiPcCapsule.ps1captures an existing PC’s personality (live DB backup + PRIMS tree + identity) into a portable, hardware-independent capsule — runs on old PCs over TeamViewer.New-PsiPcUsb.ps1 -CapsulePath …redeploys it onto a freshly-built current-OS PC (platform fresh from S:, PRIMS from the capsule).
Keep Macrium for same-hardware bare-metal recovery; the capsule is for migration/DR. Detail: docs/lifecycle-capsule.md.
Key facts & gotchas
- OOBE on Win11 24H2 does not auto-apply
autounattend.xmlfrom USB. Always usebootstrap.cmd(Shift+F10at OOBE). USB SSDs (e.g. Samsung T7) also enumerate as fixed disks, but it’s moot — 24H2 doesn’t auto-scan either. - Bench needs internet, not DFS. No internet → Windows/Dell updates, Adobe, TeamViewer, and winget-based Dell debloat are skipped/punch-listed (Store-app debloat still works offline).
- No build step can hang or abort: installers run with a timeout and are killed if they open interactively; silent installs punch-list on failure and the build continues — the birth certificate catches what didn’t land.
- No golden master (decision, Andrew 2026-05-27): build live off the OEM image for always-current Dell drivers. Open reconsideration: LTSC + an auto-rebuilt golden image would cut runtime and dodge the OOBE fight.
Canonical docs (in the repo)
| Doc | For |
|---|---|
HANDOFF.md | Read first — current state, decisions, next moves, file map |
docs/how-to-build-a-pc.md | Operator: build a PC start to finish |
docs/architecture.md | Design: two-environment flow, step model |
docs/operations.md | Run, troubleshoot, resume, reset |
docs/development.md | Extend the tooling (add a step / installer) |
docs/lifecycle-capsule.md | Capture / redeploy / replace an existing PC |
Owners & contacts
Controls engineering build tooling. Tribal-knowledge contacts: David Baas, Dan Ziegler, Ted (final hand-off goes to the Project Engineer). Original co-op scripts by Josiah Kingma.
Related
- winget-source — the
PSI.PcSetupdistribution idea (Start-menu/WinGet packaging). - digital-thread — longer term, the project engineer emits the build manifest at software handoff.