diff --git a/Deploy-Windows.ps1 b/Deploy-Windows.ps1 index 01f1f1b..0ac6eeb 100644 --- a/Deploy-Windows.ps1 +++ b/Deploy-Windows.ps1 @@ -113,6 +113,7 @@ $stepsEnabled = @{ network = $true pcIdentity = $true activation = $true + dellUpdate = $true } if ($Config -and $Config.steps) { foreach ($key in @($stepsEnabled.Keys)) { @@ -221,6 +222,15 @@ if ($stepsEnabled['network']) { } } else { Skip-Step "Step 9 - Network" } +# ----------------------------------------------------------------------- +# Step 11 - Dell Command | Update (auto-skipped on non-Dell hardware) +# ----------------------------------------------------------------------- +if ($stepsEnabled['dellUpdate']) { + Invoke-Step -Name "Step 11 - Dell Command | Update" -Action { + & "$ScriptRoot\scripts\11-dell-update.ps1" -Config $Config -LogFile $LogFile + } +} else { Skip-Step "Step 11 - Dell Command | Update" } + # ----------------------------------------------------------------------- # Step 10 - PC identity (rename + C:\X9) - runs last, rename needs restart # ----------------------------------------------------------------------- diff --git a/internal/config/config.go b/internal/config/config.go index a7c7b71..b50d2a2 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -61,17 +61,18 @@ func DefaultConfig() Config { }, }, Steps: map[string]bool{ - "adminAccount": true, - "bloatware": true, - "software": true, - "systemRegistry": true, - "defaultProfile": true, + "adminAccount": true, + "bloatware": true, + "software": true, + "systemRegistry": true, + "defaultProfile": true, "personalization": true, - "scheduledTasks": true, - "backinfo": true, - "activation": true, - "network": true, - "pcIdentity": true, + "scheduledTasks": true, + "backinfo": true, + "activation": true, + "dellUpdate": true, + "network": true, + "pcIdentity": true, }, } } diff --git a/internal/runner/runner.go b/internal/runner/runner.go index 773b9a8..452addc 100644 --- a/internal/runner/runner.go +++ b/internal/runner/runner.go @@ -34,6 +34,7 @@ func AllSteps() []Step { {ID: "scheduledTasks", Num: "06", Name: "Scheduled Tasks", ScriptName: "06-scheduled-tasks.ps1"}, {ID: "backinfo", Num: "07", Name: "BackInfo", ScriptName: "07-backinfo.ps1"}, {ID: "activation", Num: "08", Name: "Windows aktivace", ScriptName: "08-activation.ps1"}, + {ID: "dellUpdate", Num: "11", Name: "Dell Command | Update", ScriptName: "11-dell-update.ps1"}, {ID: "network", Num: "09", Name: "Network discovery", ScriptName: "10-network.ps1"}, {ID: "pcIdentity", Num: "10", Name: "PC identita", ScriptName: "09-pc-identity.ps1"}, } diff --git a/scripts/11-dell-update.ps1 b/scripts/11-dell-update.ps1 new file mode 100644 index 0000000..aaf5f08 --- /dev/null +++ b/scripts/11-dell-update.ps1 @@ -0,0 +1,122 @@ +<# +.SYNOPSIS + Detects Dell hardware, installs Dell Command | Update, and applies all available updates. + +.DESCRIPTION + Checks Win32_ComputerSystem.Manufacturer - if not Dell, the step exits silently without + error so the same deployment script works on any hardware. On Dell machines, installs + Dell Command | Update (Universal) via winget and immediately runs /applyUpdates with + -reboot=disable. This covers drivers, firmware, and BIOS. BIOS and firmware updates are + staged at this point and finalize automatically during the restart that closes the + deployment. The operator does not need to run a separate update pass after setup. + +.ITEMS + detekce-dell-hw-win32-computersystem: Reads Win32_ComputerSystem.Manufacturer. If the string does not contain "Dell", the entire step is skipped without error. The deployment continues normally on HP, Lenovo, or any other brand. + instalace-dell-command-update-via-winget: Installs Dell.CommandUpdate.Universal silently via winget. This is the current DCU generation (v5+) that supports Latitude, OptiPlex, Precision, Vostro, and XPS on Win10 and Win11. + spusteni-vsech-aktualizaci-drivery-firmware-bios: Runs dcu-cli.exe /applyUpdates -silent -reboot=disable. Covers driver, firmware, and BIOS categories in a single pass. The -reboot=disable flag prevents DCU from rebooting mid-deployment. + bios-firmware-staging-reboot: BIOS and firmware updates are staged by DCU and finalize on the next system restart. The deployment already ends with a restart (step 09 - computer rename), so no extra reboot is needed. +#> +param( + [object]$Config, + [string]$LogFile +) + +$ErrorActionPreference = "Continue" + +function Write-Log { + param([string]$Message, [string]$Level = "INFO") + $line = "[$(Get-Date -Format 'HH:mm:ss')] [$Level] $Message" + Add-Content -Path $LogFile -Value $line -Encoding UTF8 + switch ($Level) { + "OK" { Write-Host $line -ForegroundColor Green } + "ERROR" { Write-Host $line -ForegroundColor Red } + "WARN" { Write-Host $line -ForegroundColor Yellow } + "STEP" { Write-Host $line -ForegroundColor Cyan } + default { Write-Host $line } + } +} + +# ----------------------------------------------------------------------- +# Detect Dell hardware +# ----------------------------------------------------------------------- +Write-Log "Checking hardware manufacturer" -Level INFO + +try { + $cs = Get-CimInstance -ClassName Win32_ComputerSystem -ErrorAction Stop + $manufacturer = $cs.Manufacturer + $model = $cs.Model + Write-Log " Manufacturer: $manufacturer Model: $model" -Level INFO +} +catch { + Write-Log " Failed to query Win32_ComputerSystem: $_" -Level ERROR + return +} + +if ($manufacturer -notmatch "Dell") { + Write-Log "Not a Dell machine ($manufacturer) - step skipped" -Level WARN + return +} + +Write-Log "Dell confirmed: $model" -Level OK + +# ----------------------------------------------------------------------- +# Install Dell Command | Update via winget +# ----------------------------------------------------------------------- +Write-Log "Installing Dell Command | Update (Universal)..." -Level STEP + +$wingetArgs = @( + "install", + "--id", "Dell.CommandUpdate.Universal", + "--silent", + "--accept-package-agreements", + "--accept-source-agreements" +) + +$wingetOutput = & winget @wingetArgs 2>&1 +$wingetExit = $LASTEXITCODE +$wingetOutput | ForEach-Object { Write-Log " [winget] $_" -Level INFO } + +if ($wingetExit -ne 0 -and $wingetExit -ne 1638) { # 1638 = already installed + Write-Log " winget exit code $wingetExit - checking if DCU is already present" -Level WARN +} + +# Locate dcu-cli.exe (path is the same for x64 and Universal edition) +$dcuCandidates = @( + "C:\Program Files\Dell\CommandUpdate\dcu-cli.exe", + "C:\Program Files (x86)\Dell\CommandUpdate\dcu-cli.exe" +) +$dcuCli = $dcuCandidates | Where-Object { Test-Path $_ } | Select-Object -First 1 + +if (-not $dcuCli) { + Write-Log " dcu-cli.exe not found - cannot run updates" -Level ERROR + return +} + +Write-Log " dcu-cli.exe found: $dcuCli" -Level OK + +# ----------------------------------------------------------------------- +# Run all available updates (drivers, firmware, BIOS) +# -reboot=disable -> no mid-deployment reboot; BIOS/firmware staged for next restart +# ----------------------------------------------------------------------- +Write-Log "Running Dell Command | Update (all categories, no auto-reboot)..." -Level STEP +Write-Log " This may take several minutes depending on available updates" -Level INFO + +$dcuOutput = & $dcuCli /applyUpdates -silent -reboot=disable 2>&1 +$exitCode = $LASTEXITCODE +$dcuOutput | ForEach-Object { Write-Log " [DCU] $_" -Level INFO } + +Write-Log " DCU exit code: $exitCode" -Level INFO + +# Dell Command | Update exit codes: +# 0 = completed, no updates required or updates applied (no reboot needed) +# 1 = updates applied, reboot required to finalize BIOS/firmware +# 5 = no applicable updates found for this system +# others = error or partial failure +switch ($exitCode) { + 0 { Write-Log "Dell Command | Update: complete (no reboot required)" -Level OK } + 1 { Write-Log "Dell Command | Update: updates staged - BIOS/firmware will finalize on restart" -Level OK } + 5 { Write-Log "Dell Command | Update: no applicable updates for this model" -Level OK } + default { Write-Log "Dell Command | Update: exit code $exitCode - review DCU log in C:\ProgramData\Dell\UpdateService\Logs" -Level WARN } +} + +Write-Log "Step 11 complete" -Level OK diff --git a/web/data/descriptions.json b/web/data/descriptions.json index fbfd76d..c06c898 100644 --- a/web/data/descriptions.json +++ b/web/data/descriptions.json @@ -146,5 +146,15 @@ "povolit-ping-icmp-firewall": "Enables \"File and Printer Sharing (Echo Request)\" firewall rules for ICMPv4 and ICMPv6. ICMP echo is disabled by default on clean Windows. Required for network diagnostics, monitoring tools, and basic connectivity verification.", "zapnout-network-discovery": "Enables the Network Discovery firewall rule group (FPS-NB_Name-In-UDP, LLMNR, etc.) for Private and Domain profiles via Set-NetFirewallRule. Allows this PC to appear in Network Neighborhood and browse other machines." } + }, + "11-dell-update": { + "synopsis": "Detects Dell hardware, installs Dell Command | Update, and applies all available updates.", + "description": "Checks Win32_ComputerSystem.Manufacturer - if not Dell, the step exits silently without\nerror so the same deployment script works on any hardware. On Dell machines, installs\nDell Command | Update (Universal) via winget and immediately runs /applyUpdates with\n-reboot=disable. This covers drivers, firmware, and BIOS. BIOS and firmware updates are\nstaged at this point and finalize automatically during the restart that closes the\ndeployment. The operator does not need to run a separate update pass after setup.", + "items": { + "detekce-dell-hw-win32-computersystem": "Reads Win32_ComputerSystem.Manufacturer. If the string does not contain \"Dell\", the entire step is skipped without error. The deployment continues normally on HP, Lenovo, or any other brand.", + "instalace-dell-command-update-via-winget": "Installs Dell.CommandUpdate.Universal silently via winget. This is the current DCU generation (v5+) that supports Latitude, OptiPlex, Precision, Vostro, and XPS on Win10 and Win11.", + "spusteni-vsech-aktualizaci-drivery-firmware-bios": "Runs dcu-cli.exe /applyUpdates -silent -reboot=disable. Covers driver, firmware, and BIOS categories in a single pass. The -reboot=disable flag prevents DCU from rebooting mid-deployment.", + "bios-firmware-staging-reboot": "BIOS and firmware updates are staged by DCU and finalize on the next system restart. The deployment already ends with a restart (step 09 - computer rename), so no extra reboot is needed." + } } } \ No newline at end of file diff --git a/web/index.html b/web/index.html index 3607d64..e16cf71 100644 --- a/web/index.html +++ b/web/index.html @@ -34,28 +34,10 @@ align-items: center; gap: .75rem; } - .logo-text { - font-size: 1.2rem; - font-weight: 700; - color: #fff; - letter-spacing: -.02em; - } - .logo-sub { - font-size: .8rem; - color: var(--muted); - margin-left: .2rem; - } - header nav { - margin-left: auto; - display: flex; - gap: 1.5rem; - } - header nav a { - color: var(--muted); - text-decoration: none; - font-size: .88rem; - transition: color .15s; - } + .logo-text { font-size: 1.2rem; font-weight: 700; color: #fff; letter-spacing: -.02em; } + .logo-sub { font-size: .8rem; color: var(--muted); margin-left: .2rem; } + header nav { margin-left: auto; display: flex; gap: 1.5rem; } + header nav a { color: var(--muted); text-decoration: none; font-size: .88rem; transition: color .15s; } header nav a:hover { color: var(--text); } main { @@ -81,92 +63,64 @@ } h1 { - font-size: 2.8rem; - font-weight: 800; - color: #fff; - letter-spacing: -.04em; - line-height: 1.1; - margin-bottom: 1rem; - max-width: 600px; + font-size: 2.8rem; font-weight: 800; color: #fff; + letter-spacing: -.04em; line-height: 1.1; + margin-bottom: 1rem; max-width: 600px; } h1 span { color: var(--blue); } .tagline { - font-size: 1.1rem; - color: var(--muted); - max-width: 480px; - line-height: 1.6; - margin-bottom: 2.5rem; + font-size: 1.1rem; color: var(--muted); max-width: 480px; + line-height: 1.6; margin-bottom: 2.5rem; } + /* ---- ACTIONS ---- */ .actions { - display: flex; - gap: .75rem; - flex-wrap: wrap; - justify-content: center; - margin-bottom: 4rem; + display: flex; gap: .75rem; flex-wrap: wrap; + justify-content: center; margin-bottom: 1.5rem; } .btn-primary { - padding: .6rem 1.4rem; - background: var(--accent-bright); - color: #fff; - border: 1px solid transparent; - border-radius: 8px; - font-size: .95rem; - font-weight: 600; - text-decoration: none; - transition: opacity .15s; + padding: .6rem 1.4rem; background: var(--accent-bright); color: #fff; + border: 1px solid transparent; border-radius: 8px; + font-size: .95rem; font-weight: 600; text-decoration: none; transition: opacity .15s; } .btn-primary:hover { opacity: .85; } .btn-secondary { - padding: .6rem 1.4rem; - background: transparent; - color: var(--text); - border: 1px solid var(--border); - border-radius: 8px; - font-size: .95rem; - text-decoration: none; - transition: background .15s; + padding: .6rem 1.4rem; background: transparent; color: var(--text); + border: 1px solid var(--border); border-radius: 8px; + font-size: .95rem; text-decoration: none; transition: background .15s; } .btn-secondary:hover { background: var(--card); } + /* ---- DOWNLOAD STRIP ---- */ + .download-strip { + margin-bottom: 3.5rem; + display: flex; align-items: center; gap: .6rem; + background: var(--card); border: 1px solid var(--border); + border-radius: 10px; padding: .6rem 1.1rem; + font-size: .85rem; + } + .download-strip a { + color: var(--blue); text-decoration: none; font-weight: 600; + display: flex; align-items: center; gap: .35rem; + } + .download-strip a:hover { text-decoration: underline; } + .download-strip .dl-meta { color: var(--muted); font-size: .78rem; } + .download-strip .dl-sep { color: var(--border); } + + /* ---- CARDS ---- */ .cards { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); - gap: 1rem; - max-width: 720px; - width: 100%; - } - .card { - background: var(--card); - border: 1px solid var(--border); - border-radius: 10px; - padding: 1.2rem; - text-align: left; - } - .card-icon { - font-size: 1.3rem; - margin-bottom: .6rem; - display: block; - } - .card h3 { - font-size: .9rem; - font-weight: 600; - color: #fff; - margin-bottom: .3rem; - } - .card p { - font-size: .82rem; - color: var(--muted); - line-height: 1.4; + display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + gap: 1rem; max-width: 720px; width: 100%; } + .card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 1.2rem; text-align: left; } + .card-icon { font-size: 1.3rem; margin-bottom: .6rem; display: block; } + .card h3 { font-size: .9rem; font-weight: 600; color: #fff; margin-bottom: .3rem; } + .card p { font-size: .82rem; color: var(--muted); line-height: 1.4; } footer { - border-top: 1px solid var(--border); - padding: 1.2rem 2rem; - text-align: center; - font-size: .8rem; - color: var(--muted); + border-top: 1px solid var(--border); padding: 1.2rem 2rem; + text-align: center; font-size: .8rem; color: var(--muted); } footer a { color: var(--muted); text-decoration: none; } footer a:hover { color: var(--text); } @@ -201,6 +155,19 @@ Git repozitar + + +
@@ -220,7 +187,7 @@
🚀

Go TUI launcher

-

xetup.exe — jednotny binarni spoustec. Zatim ve vyvoji.

+

xetup.exe — jednotny binarni spoustec s TUI formularom a live logem.

@@ -233,5 +200,34 @@ Specifikace + + diff --git a/web/spec/index.html b/web/spec/index.html index 38e79d6..43cb481 100644 --- a/web/spec/index.html +++ b/web/spec/index.html @@ -508,6 +508,7 @@

Planovane kroky

09 – PC identita + C:\X9 10 – Network discovery + 11 – Dell Command | Update Taskbar profily

Architektura

@@ -831,6 +832,32 @@
+ +
+
+ 11 + Dell Command | Update + OK +
+
+ + + + + +
Detekce Dell hardware (Win32_ComputerSystem)Non-Dell stroj krok preskoci bez chyby – stejny skript pro vsechny HW
Instalace Dell Command | Update via wingetDell.CommandUpdate.Universal – silent, Win10 + Win11
Spusteni vsech aktualizaci: drivery, firmware, BIOSdcu-cli.exe /applyUpdates -silent -reboot=disable
BIOS/firmware se staging – dokonci se pri restartuRestart po konci deploymenty (krok 10 rename) vse dokonci
+
+ Non-Dell stroje: krok se preskoci automaticky, zadna chyba. Dell Latitude, OptiPlex, + Precision, Vostro, XPS – vsechny podporovane DCU Universal.

+ Casova narocnost: 5–20 minut podle poctu dostupnych aktualizaci a rychlosti siteho pripojeni. +
+
+ +
+
@@ -1102,9 +1129,10 @@ 'step-05': '05-personalization', 'step-06': '06-scheduled-tasks', 'step-07': '07-backinfo', - 'step-pc': '09-pc-identity', - 'step-net': '10-network', - 'step-08': '08-activation', + 'step-pc': '09-pc-identity', + 'step-net': '10-network', + 'step-08': '08-activation', + 'step-dell': '11-dell-update', }; function getItemDesc(stepId, slug) {