Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
One Windows setup repo with two profiles:

- `daily`: `scripts/Install.ps1`, modular, engineering workstation.
- `iot`: `install-Win-Iot.ps1`, slim Win10/Win11 IoT LTSC build.
- `iot`: `scripts/modules/iot/`, slim Win10/Win11 IoT LTSC build.

`Install.ps1` and `Validate.ps1` are the front doors. `config/` is the only
config tree. Docs live in `docs/`. Ventoy answer files live in `ventoy/script/`.
Expand Down
9 changes: 2 additions & 7 deletions Install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,13 @@ if ($Status -and $Profile -ne 'daily') {
throw '-Status is only available for the daily profile.'
}

if ($Profile -eq 'iot') {
$entry = Join-Path $root 'install-Win-Iot.ps1'
}
else {
$entry = Join-Path $root 'scripts\Install.ps1'
}
$entry = Join-Path $root 'scripts\Install.ps1'

if (-not (Test-Path -LiteralPath $entry)) {
throw "Missing profile entry point: $entry"
}

$arguments = @()
$arguments = @('-Profile', $Profile)
if ($DryRun) { $arguments += '-DryRun' }
if ($Force) { $arguments += '-Force' }
if ($Only.Count -gt 0) { $arguments += @('-Only', ($Only -join ',')) }
Expand Down
4 changes: 2 additions & 2 deletions Validate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

.DESCRIPTION
-Profile daily calls scripts/Validate.ps1 and is the default.
-Profile iot calls install-Win-Iot.ps1 -Verify.
-Profile iot calls scripts/Install.ps1 -Profile iot -Verify.
Neither path writes settings.
#>
[CmdletBinding()]
Expand All @@ -18,7 +18,7 @@ $ErrorActionPreference = 'Stop'

$root = Split-Path -Parent $MyInvocation.MyCommand.Path
if ($Profile -eq 'iot') {
& powershell -NoProfile -ExecutionPolicy Bypass -File (Join-Path $root 'install-Win-Iot.ps1') -Verify
& powershell -NoProfile -ExecutionPolicy Bypass -File (Join-Path $root 'scripts\Install.ps1') -Profile iot -Verify
}
else {
& powershell -NoProfile -ExecutionPolicy Bypass -File (Join-Path $root 'scripts\Validate.ps1')
Expand Down
4 changes: 2 additions & 2 deletions docs/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ to the profile script unchanged.
| command | profile | target |
| --- | --- | --- |
| `Install.ps1 -Profile daily` | daily | `scripts/Install.ps1` |
| `Install.ps1 -Profile iot` | iot | `install-Win-Iot.ps1` |
| `Install.ps1 -Profile iot` | iot | `scripts/Install.ps1 -Profile iot` |
| `Install.ps1 -Profile daily -Verify` | daily | `Validate.ps1 -Profile daily` |
| `Install.ps1 -Profile iot -Verify` | iot | `Validate.ps1 -Profile iot` |
| `Install.ps1 -Profile daily -Status` | daily | saved daily state only |
| `Validate.ps1` | daily | `scripts/Validate.ps1` |
| `Validate.ps1 -Profile iot` | iot | `install-Win-Iot.ps1 -Verify` |
| `Validate.ps1 -Profile iot` | iot | `scripts/Install.ps1 -Profile iot -Verify` |

`Install.ps1 -Verify` is an alias for the matching validator. Neither validation
path writes settings, state, logs, transcripts, or reports. `Setup.cmd` always
Expand Down
26 changes: 25 additions & 1 deletion scripts/Install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#>
[CmdletBinding()]
param(
[ValidateSet('daily', 'iot')][string]$Profile = 'daily',
[switch]$Status,
[switch]$DryRun,
[string[]]$Only = @(),
Expand All @@ -49,7 +50,24 @@ param(
[string]$GitName,
[string]$GitEmail,
[string]$TiaInstaller,
[string]$MatlabInstaller
[string]$MatlabInstaller,
[string]$StateDir = 'C:\Windows\Logs\Win-Iot-Setup\state',
[string]$BuildConfig = '',
[string]$Arch = '',
[switch]$DetectHardware,
[switch]$Minimal,
[switch]$Unattended,
[switch]$NoWingetBootstrap,
[string]$OfflineDir = '',
[string]$LogDir = 'C:\Windows\Logs\Win-Iot-Setup',
[string]$DriverDir = '',
[switch]$ConfigsOnly,
[switch]$Reboot,
[switch]$Fixes,
[switch]$Verify,
[switch]$SkipHashVerify,
[switch]$Idempotent,
[string[]]$SkipApps = @()
)

Set-StrictMode -Version Latest
Expand All @@ -58,6 +76,12 @@ $ErrorActionPreference = 'Stop'
$libPath = Join-Path $PSScriptRoot 'lib\Common.ps1'
. $libPath

if ($Profile -eq 'iot') {
# IoT profile: run the modular IoT implementation from scripts/modules/iot.
. (Join-Path $PSScriptRoot 'modules\iot\IotMain.ps1')
exit 0
}

if ($Status) {
$statusState = Get-StackState
$statusOrder = @('preflight', 'os', 'packages', 'apps', 'engineering', 'developer', 'omniroute', 'theme', 'configs', 'validate')
Expand Down
43 changes: 1 addition & 42 deletions install-Win-Iot.ps1 → scripts/modules/iot/IotMain.ps1
Original file line number Diff line number Diff line change
@@ -1,49 +1,8 @@
<#
.SYNOPSIS
My Win10/Win11 IoT (Enterprise) LTSC setup. Unattended, rerunnable.
.DESCRIPTION
Built for a tiny10 box with no store and usually no network
on first boot. PS 5.1, stock Windows desktop, LibreWolf, VSCodium.
No extra shell, no extra window manager. Stock colors everywhere.
Engines per app, first hit wins: staged -OfflineDir files, winget,
github releases, direct vendor URLs. Log lands in C:\Windows\Logs\Win-Iot-Setup
either way.
.EXAMPLE
powershell -ExecutionPolicy Bypass -File install-Win-Iot.ps1
powershell -ExecutionPolicy Bypass -File install-Win-Iot.ps1 -Unattended -OfflineDir D:\Offline
powershell -ExecutionPolicy Bypass -File install-Win-Iot.ps1 -Unattended -DriverDir D:\Drivers -Reboot
powershell -ExecutionPolicy Bypass -File install-Win-Iot.ps1 -Minimal -Unattended
powershell -ExecutionPolicy Bypass -File install-Win-Iot.ps1 -ConfigsOnly
(configs-only: re-copy user configs to their real locations, nothing else.)
#>
[CmdletBinding()]
param(
[switch]$SkipHashVerify,
[switch]$Idempotent,
[switch]$Force,
[string]$StateDir = 'C:\Windows\Logs\Win-Iot-Setup\state',
[string]$BuildConfig = '',
[string]$Arch = '',
[switch]$DetectHardware,
[switch]$Minimal,
[switch]$Unattended,
[switch]$NoWingetBootstrap,
[string]$OfflineDir = '',
[string]$LogDir = 'C:\Windows\Logs\Win-Iot-Setup',
[string]$DriverDir = '',
[switch]$ConfigsOnly,
[switch]$Reboot,
[switch]$Fixes,
[switch]$DryRun,
[switch]$Verify,
[string[]]$Only = @(),
[string[]]$SkipApps = @()
)
$ErrorActionPreference = 'Continue'
Set-StrictMode -Version 2
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

$Repo = Split-Path $MyInvocation.MyCommand.Path -Parent
$Repo = $script:RepoRoot
# -ConfigsOnly re-deploys user configs (VSCodium, Vesktop, qBittorrent, opencode,
# terminal, ...) and nothing else. install phases are gated below.
# log, state, and transcript start after -Verify, so the read-only path writes nothing.
Expand Down