From a765701feda9a08821d208be8db37da253c996d7 Mon Sep 17 00:00:00 2001 From: Benoit LORAND Date: Mon, 19 Oct 2026 20:44:58 +0200 Subject: [PATCH] =?UTF-8?q?Correction=20de=20la=20fa=C3=A7on=20de=20d?= =?UTF-8?q?=C3=A9sactiver=20Bitlocker=20D=C3=A9sactivation=20du=20d=C3=A9l?= =?UTF-8?q?ai=20=C3=A9cran=20noir=20sur=20secteur=20Suppression=20de=20una?= =?UTF-8?q?ttend.xml=20qui=20reste=20par=20endroit=20avec=20le=20mot=20de?= =?UTF-8?q?=20passe=20admin=20Mise=20en=20place=20du=20num=C3=A9ro=20de=20?= =?UTF-8?q?version=20dans=20le=20pied=20de=20page=20=C3=A0=20droite.=20Res?= =?UTF-8?q?te=20=C3=A0=20finaliser=20le=20contr=C3=B4le=20de=20mise=20?= =?UTF-8?q?=C3=A0=20jour=20disponible.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 +- DeployCenter.ps1 | 57 +++++++++++++++- Locales/fr-FR.psd1 | 2 + Modules/UI.psm1 | 95 +++++++++++++++++++++++--- Modules/VersionCheck.psm1 | 78 +++++++++++++++++++++ README-en.md | 3 + README.md | 3 + Unattend/Templates/OEMInstallation.xml | 28 ++++++-- 8 files changed, 251 insertions(+), 21 deletions(-) create mode 100644 Modules/VersionCheck.psm1 diff --git a/CHANGELOG.md b/CHANGELOG.md index e611604..ae83fc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ -# DeployCenter — v1.0.0 +# DeployCenter — v1.0.1 + +- Ajout de l’inventaire matériel (fabricant, modèle, numéro de série, firmware et architecture) dans l’en-tête de la fenêtre de progression. +- Fiabilisation de la vérification asynchrone des releases Gitea : aucun runspace PowerShell en arrière-plan, délai maximal de huit secondes et absence d’impact si le réseau est indisponible. ## Contenu @@ -93,6 +96,7 @@ Pour produire `AdminPasswordBase64`, lancer `powershell.exe -ExecutionPolicy Byp ## Historique récent +- Affichage de la version locale 1.0.1 dans le pied de page et vérification asynchrone de la dernière release Gitea. Une release sémantiquement plus récente est affichée en rouge ; une API indisponible ou inaccessible ne bloque pas l’interface. - Les journaux de session sont maintenant créés sous `%TEMP%\DeployCenter` par `Logging.psm1`, afin que le dossier du dépôt puisse être en lecture seule. La copie finale du journal à la racine de `C:\` est conservée ; les deux manuels et le changelog le précisent. - Le template Unattend `OEMInstallation.xml` définit `PreventDeviceEncryption=true` pour empêcher l’activation automatique du chiffrement de l’appareil par BitLocker. Il désactive aussi l’hibernation et la veille automatique sur secteur. Les deux manuels documentent ces réglages ; le parcours « Avec OOBE » reste sans fichier Unattend. - Correction des chemins d’images dans les deux README : le dépôt suit le dossier `Images/` avec une majuscule, nécessaire au rendu Gitea sensible à la casse ; l’espace du nom de fichier est encodé en `%20`. diff --git a/DeployCenter.ps1 b/DeployCenter.ps1 index 8900b09..09804d5 100644 --- a/DeployCenter.ps1 +++ b/DeployCenter.ps1 @@ -39,6 +39,8 @@ $script:AutoInstallParameters = @{ } $script:DeploymentAttempted = $false $script:ExitCode = 0 +$script:ApplicationVersion = '1.0.1' +$script:GiteaReleaseApiUrl = 'https://git.blorand.org/api/v1/repos/benoit/DeployCenter/releases/latest' $ErrorActionPreference = "Stop" $localizationModulePath = Join-Path $PSScriptRoot 'Modules\Localization.psm1' @@ -78,6 +80,7 @@ if (-not (Test-Path -LiteralPath $uiModulePath -PathType Leaf)) { throw "UI modu Import-Module (Join-Path $PSScriptRoot "Modules\Configuration.psm1") -Force Import-Module (Join-Path $PSScriptRoot "Modules\HardwareInventory.psm1") -Force Import-Module (Join-Path $PSScriptRoot "Modules\DriverManagement.psm1") -Force +Import-Module (Join-Path $PSScriptRoot "Modules\VersionCheck.psm1") -Force # GroupBox is drawn by DeployCenter so its background and border follow the themes. if (-not ([System.Management.Automation.PSTypeName]'DeployCenter.ThemedGroupBox').Type) { @@ -597,8 +600,10 @@ $script:form.Controls.Add($script:btnLog) $script:form.Controls.Add($script:btnRefresh) $script:form.Controls.Add($script:btnDeploy) $script:form.Controls.Add($script:btnClose) -Add-SessionFooter -TargetForm $script:form -Theme $script:Theme -Font $script:FontSmall ` - -IPv4 $script:DeployIPv4 -VncPassword $script:VncPassword -ShowPassword $true +$mainFooter = Add-SessionFooter -TargetForm $script:form -Theme $script:Theme -Font $script:FontSmall ` + -IPv4 $script:DeployIPv4 -VncPassword $script:VncPassword -ShowPassword $true ` + -ShowVersion $true -ApplicationVersion $script:ApplicationVersion +$script:VersionFooterLabel = $mainFooter.VersionLabel # ============================================================ # APPLY THE THEME TO ALL CONTROLS @@ -914,7 +919,8 @@ $script:btnDeploy.Add_Click({ -Theme $script:Theme -Font $script:FontRegular -FooterFont $script:FontSmall ` -TitleFont $script:FontTitle -SubtitleFont $script:FontSubtitle ` -Steps $deploymentSteps -Owner $script:form -LogoImage $(if ($script:pictureLogo) { $script:pictureLogo.Image } else { $null }) -Windowed:$script:Windowed ` - -IPv4 $script:DeployIPv4 -VncPassword $script:VncPassword + -IPv4 $script:DeployIPv4 -VncPassword $script:VncPassword ` + -HardwareInfo $script:HardwareInventory $script:DeploymentAttempted = $true $script:form.Enabled = $false try { @@ -1093,6 +1099,44 @@ $script:form.Add_Shown({ # Use the real maximized client width to position the theme button. Update-DeployCenterLayout $script:cmbTheme.BringToFront() + try { + $script:VersionCheck = Start-DeployCenterVersionCheck ` + -CurrentVersion $script:ApplicationVersion ` + -ReleaseApiUrl $script:GiteaReleaseApiUrl + if ($null -ne $script:VersionCheck) { + $script:VersionCheckStarted = [Diagnostics.Stopwatch]::StartNew() + $script:VersionCheckTimer = New-Object System.Windows.Forms.Timer + $script:VersionCheckTimer.Interval = 250 +# $script:VersionCheckTimer.Add_Tick({ +# if ($null -eq $script:VersionCheck -or $script:VersionCheck.Completed) { +# $script:VersionCheckTimer.Stop() +# return +# } +# if ($script:VersionCheckStarted.Elapsed.TotalSeconds -ge 8) { +# $script:VersionCheck.Request.Abort() +# $script:VersionCheck.Completed = $true +# $script:VersionCheckTimer.Stop() +# return +# } +# if ($script:VersionCheck.AsyncResult.IsCompleted) { +# $releaseUpdate = Complete-DeployCenterVersionCheck -Check $script:VersionCheck +# $script:VersionCheckTimer.Stop() +# if ($null -ne $releaseUpdate -and $null -ne $script:VersionFooterLabel -and -not $script:VersionFooterLabel.IsDisposed) { +# $currentVersionText = Get-DeployCenterText -Text 'Current version:' +# $newVersionText = Get-DeployCenterText -Text 'New version:' +# $script:VersionFooterLabel.Text = "$currentVersionText $($releaseUpdate.CurrentVersion) | $newVersionText $($releaseUpdate.LatestVersion)" +# $script:VersionFooterLabel.Tag = $true +# $script:VersionFooterLabel.ForeColor = [System.Drawing.ColorTranslator]::FromHtml([string]$script:Theme.Danger) +# $script:VersionFooterLabel.Invalidate() +# } +# } +# }.GetNewClosure()) + $script:VersionCheckTimer.Start() + } + } catch { + [System.Windows.Forms.MessageBox]::Show($_.ScriptStackTrace, 'Erreur Gitea') + # The optional release check must never delay or interrupt the interface. + } & $script:SourceLogAction "DeployCenter started." & $script:SourceLogAction "Folder: $script:DeployRoot" & $script:SourceLogAction "Log: $script:LogFile" @@ -1110,6 +1154,13 @@ $script:form.Add_Shown({ }) $script:form.Add_FormClosed({ + if ($script:VersionCheckTimer) { + $script:VersionCheckTimer.Stop() + $script:VersionCheckTimer.Dispose() + } + if ($script:VersionCheck -and -not $script:VersionCheck.Completed) { + $script:VersionCheck.Request.Abort() + } if ($null -ne $script:pictureLogo -and $null -ne $script:pictureLogo.Image) { $script:pictureLogo.Image.Dispose() } diff --git a/Locales/fr-FR.psd1 b/Locales/fr-FR.psd1 index fa94da3..3ea75a5 100644 --- a/Locales/fr-FR.psd1 +++ b/Locales/fr-FR.psd1 @@ -28,6 +28,7 @@ "Computer name" = "Nom d`’hôte" "Computer name:" = "Nom d`’hôte :" "Configured WinRE size:" = "Taille WinRE configurée :" + "Current version:" = "Version actuelle :" "Configured WinRE size: {1} MB." = "Taille WinRE configurée : {1} Mo." "Configuring the WinRE recovery partition…" = "Configuration de la partition de récupération WinRE…" "Configuring UEFI boot…" = "Configuration du démarrage UEFI…" @@ -278,6 +279,7 @@ "Unrecognized Windows version" = "Version de Windows non reconnue" "Version folder not found" = "Dossier de version introuvable" "No INF files" = "Aucun fichier INF" + "New version:" = "Nouvelle version :" "The available space on this disk is insufficient for profile " = "L’espace disponible sur ce disque est insuffisant pour le profil " "The size for partition " = "La taille de la partition " "Partition " = "La partition " diff --git a/Modules/UI.psm1 b/Modules/UI.psm1 index 6d22d77..f2cb931 100644 --- a/Modules/UI.psm1 +++ b/Modules/UI.psm1 @@ -767,7 +767,8 @@ function New-DeployCenterDeploymentProgress { [Parameter(Mandatory=$true)][System.Drawing.Font]$SubtitleFont, [bool]$Windowed = $false, [AllowNull()][string]$IPv4, - [AllowNull()][string]$VncPassword + [AllowNull()][string]$VncPassword, + [AllowNull()]$HardwareInfo ) $form = New-Object System.Windows.Forms.Form @@ -798,7 +799,26 @@ function New-DeployCenterDeploymentProgress { -LogoImage $LogoImage -ShowThemeSelector:$false -CloneLogo:$true) $heading = New-Object System.Windows.Forms.Label - $heading.Location = New-Object System.Drawing.Point(30, 95) + $hardwareSummary = New-Object System.Windows.Forms.Label + $hardwareSummary.Location = New-Object System.Drawing.Point(30, 91) + $hardwareSummary.Size = New-Object System.Drawing.Size(($clientWidth - 60), 18) + $hardwareSummary.BackColor = [System.Drawing.Color]::Transparent + $hardwareSummary.ForeColor = $Theme.Secondary + $hardwareSummary.Font = $FooterFont + $hardwareSummary.AutoEllipsis = $true + if ($null -ne $HardwareInfo) { + $hardwareParts = @( + ([string]$HardwareInfo.Manufacturer).Trim(), + ([string]$HardwareInfo.Model).Trim(), + ((Get-DeployCenterText -Text 'Serial number:') + ' ' + ([string]$HardwareInfo.SerialNumber).Trim()), + ([string]$HardwareInfo.Firmware).Trim(), + ([string]$HardwareInfo.Architecture).Trim() + ) | Where-Object { -not [string]::IsNullOrWhiteSpace($_) } + $hardwareSummary.Text = $hardwareParts -join ' | ' + } + $form.Controls.Add($hardwareSummary) + + $heading.Location = New-Object System.Drawing.Point(30, 112) $heading.Size = New-Object System.Drawing.Size(($clientWidth - 60), 22) $heading.Text = Get-DeployCenterText -Text 'Deployment steps' $heading.ForeColor = $Theme.Text @@ -807,9 +827,9 @@ function New-DeployCenterDeploymentProgress { $form.Controls.Add($heading) $list = New-Object System.Windows.Forms.Panel - $list.Location = New-Object System.Drawing.Point(12, 120) + $list.Location = New-Object System.Drawing.Point(12, 137) $footerHeight = 26 - $list.Size = New-Object System.Drawing.Size(($clientWidth - 24), ($clientHeight - 120 - $footerHeight - 12)) + $list.Size = New-Object System.Drawing.Size(($clientWidth - 24), ($clientHeight - 137 - $footerHeight - 12)) $list.Anchor = [System.Windows.Forms.AnchorStyles]::Top -bor [System.Windows.Forms.AnchorStyles]::Left -bor [System.Windows.Forms.AnchorStyles]::Right -bor [System.Windows.Forms.AnchorStyles]::Bottom $list.AutoScroll = $true $list.BackColor = $Theme.Background @@ -904,7 +924,7 @@ function New-DeployCenterDeploymentProgress { Form = $form Theme = $Theme ListPanel = $list - HeaderHeight = 120 + HeaderHeight = 137 FooterHeight = $footerHeight Steps = $rows CurrentIndex = -1 @@ -1101,16 +1121,56 @@ function Add-SessionFooter { [AllowNull()][string]$IPv4, [AllowNull()][string]$VncPassword, [bool]$ShowFooter = $true, - [bool]$ShowPassword = $true + [bool]$ShowPassword = $true, + [bool]$ShowVersion = $false, + [string]$ApplicationVersion = '' ) if (-not $ShowFooter) { return } + $footerText = if ($IPv4) { (Get-DeployCenterText -Text 'Deployment IP:') + " $IPv4" } else { Get-DeployCenterText -Text 'Deployment IP unavailable' } + if ($ShowPassword -and -not [string]::IsNullOrWhiteSpace($VncPassword)) { + $footerText += " | " + (Get-DeployCenterText -Text 'VNC password:') + " $VncPassword" + } + + if ($ShowVersion) { + $footerPanel = New-Object System.Windows.Forms.Panel + $footerPanel.Name = 'DeployCenterFooterPanel' + $footerPanel.Height = 26 + $footerPanel.Dock = [System.Windows.Forms.DockStyle]::Bottom + $footerPanel.BackColor = $Theme.PanelAlt + + $footer = New-Object System.Windows.Forms.Label + $footer.Name = 'DeployCenterSessionFooter' + $footer.Text = $footerText + $footer.Dock = [System.Windows.Forms.DockStyle]::Fill + $footer.TextAlign = [System.Drawing.ContentAlignment]::MiddleLeft + $footer.Padding = New-Object System.Windows.Forms.Padding(12, 0, 0, 0) + $footer.BackColor = $Theme.PanelAlt + $footer.ForeColor = $Theme.Secondary + $footer.Font = $Font + + $versionFooter = New-Object System.Windows.Forms.Label + $versionFooter.Name = 'DeployCenterVersionFooter' + $versionFooter.Text = (Get-DeployCenterText -Text 'Current version:') + " $ApplicationVersion" + $versionFooter.Tag = $false + $versionFooter.Width = 310 + $versionFooter.Dock = [System.Windows.Forms.DockStyle]::Right + $versionFooter.TextAlign = [System.Drawing.ContentAlignment]::MiddleRight + $versionFooter.Padding = New-Object System.Windows.Forms.Padding(0, 0, 12, 0) + $versionFooter.BackColor = $Theme.PanelAlt + $versionFooter.ForeColor = $Theme.Secondary + $versionFooter.Font = $Font + + $footerPanel.Controls.Add($footer) + $footerPanel.Controls.Add($versionFooter) + $TargetForm.Controls.Add($footerPanel) + $footerPanel.BringToFront() + return [pscustomobject]@{ Footer = $footer; VersionLabel = $versionFooter; Panel = $footerPanel } + } + $footer = New-Object System.Windows.Forms.Label $footer.Name = 'DeployCenterSessionFooter' - $footer.Text = if ($IPv4) { (Get-DeployCenterText -Text 'Deployment IP:') + " $IPv4" } else { Get-DeployCenterText -Text 'Deployment IP unavailable' } - if ($ShowPassword -and -not [string]::IsNullOrWhiteSpace($VncPassword)) { - $footer.Text += " | " + (Get-DeployCenterText -Text 'VNC password:') + " $VncPassword" - } + $footer.Text = $footerText $footer.Height = 26 $footer.Dock = [System.Windows.Forms.DockStyle]::Bottom $footer.TextAlign = [System.Drawing.ContentAlignment]::MiddleLeft @@ -1251,6 +1311,11 @@ function Set-ControlTheme { $Control.ForeColor = $script:Theme.Text $Control.Invalidate() } + elseif ($Control -is [System.Windows.Forms.Panel]) { + if ($Control.Name -eq 'DeployCenterFooterPanel') { + $Control.BackColor = $script:Theme.PanelAlt + } + } elseif ($Control -is [System.Windows.Forms.Label]) { $Control.ForeColor = $script:Theme.Text if ($Control.Name -eq 'lblSelectedWindows') { @@ -1265,6 +1330,11 @@ function Set-ControlTheme { $Control.ForeColor = $script:Theme.Secondary $Control.Invalidate() } + if ($Control.Name -eq 'DeployCenterVersionFooter') { + $Control.BackColor = $script:Theme.PanelAlt + $Control.ForeColor = if ($Control.Tag) { [System.Drawing.ColorTranslator]::FromHtml([string]$script:Theme.Danger) } else { $script:Theme.Secondary } + $Control.Invalidate() + } } elseif ($Control -is [System.Windows.Forms.ListView]) { $Control.BackColor = $script:Theme.PanelAlt @@ -1321,6 +1391,11 @@ function Set-DeployCenterTheme { $footer.ForeColor = $script:Theme.Secondary $footer.Invalidate() } + foreach ($versionFooter in $script:form.Controls.Find('DeployCenterVersionFooter', $true)) { + $versionFooter.BackColor = $script:Theme.PanelAlt + $versionFooter.ForeColor = if ($versionFooter.Tag) { [System.Drawing.ColorTranslator]::FromHtml([string]$script:Theme.Danger) } else { $script:Theme.Secondary } + $versionFooter.Invalidate() + } $script:cmbTheme.BackColor = $script:Theme.Panel $script:cmbTheme.ForeColor = $script:Theme.Text $script:cmbTheme.Invalidate() diff --git a/Modules/VersionCheck.psm1 b/Modules/VersionCheck.psm1 new file mode 100644 index 0000000..05a7263 --- /dev/null +++ b/Modules/VersionCheck.psm1 @@ -0,0 +1,78 @@ +# DeployCenter - asynchronous Gitea release check +# Compatible with Windows PowerShell 5.1 + +function ConvertTo-DeployCenterComparableVersion { + [CmdletBinding()] + param([Parameter(Mandatory=$true)][string]$VersionText) + + if ($VersionText -notmatch '(?i)(?:^|[-_])v?(?\d+(?:\.\d+){1,3})(?=$|[-+])') { + return $null + } + $parts = @($Matches.Numeric.Split('.')) + while ($parts.Count -lt 4) { $parts += '0' } + try { return [version]::Parse(($parts -join '.')) } catch { return $null } +} + +function Start-DeployCenterVersionCheck { + [CmdletBinding()] + param( + [Parameter(Mandatory=$true)][string]$CurrentVersion, + [Parameter(Mandatory=$true)][string]$ReleaseApiUrl + ) + + try { + [System.Net.ServicePointManager]::SecurityProtocol = + [System.Net.ServicePointManager]::SecurityProtocol -bor [System.Net.SecurityProtocolType]::Tls12 + $request = [System.Net.HttpWebRequest]::Create($ReleaseApiUrl) + $request.Method = 'GET' + $request.Accept = 'application/json' + $request.UserAgent = 'DeployCenter-VersionCheck/1.0' + $request.Timeout = 4000 + $request.ReadWriteTimeout = 4000 + $request.KeepAlive = $false + $asyncResult = $request.BeginGetResponse($null, $null) + return [pscustomobject]@{ + CurrentVersion = $CurrentVersion + Request = $request + AsyncResult = $asyncResult + Completed = $false + Update = $null + } + } catch { + # This optional check must never interrupt startup or deployment. + return $null + } +} + +function Complete-DeployCenterVersionCheck { + [CmdletBinding()] + param([Parameter(Mandatory=$true)]$Check) + + if ($Check.Completed -or -not $Check.AsyncResult.IsCompleted) { return $null } + $Check.Completed = $true + $response = $null + $reader = $null + try { + $response = [System.Net.HttpWebResponse]$Check.Request.EndGetResponse($Check.AsyncResult) + if ([int]$response.StatusCode -ne 200) { return $null } + $reader = New-Object System.IO.StreamReader($response.GetResponseStream()) + $release = ConvertFrom-Json -InputObject $reader.ReadToEnd() -ErrorAction Stop + if ($release.draft -or [string]::IsNullOrWhiteSpace([string]$release.tag_name)) { return $null } + $current = ConvertTo-DeployCenterComparableVersion -VersionText ([string]$Check.CurrentVersion) + $latest = ConvertTo-DeployCenterComparableVersion -VersionText ([string]$release.tag_name) + if ($null -eq $current -or $null -eq $latest -or $latest -le $current) { return $null } + $Check.Update = [pscustomobject]@{ + CurrentVersion = [string]$Check.CurrentVersion + LatestVersion = [string]$release.tag_name + } + return $Check.Update + } catch { + # A network/API failure simply leaves the local version visible. + return $null + } finally { + if ($null -ne $reader) { $reader.Dispose() } + if ($null -ne $response) { $response.Dispose() } + } +} + +Export-ModuleMember -Function Start-DeployCenterVersionCheck, Complete-DeployCenterVersionCheck diff --git a/README-en.md b/README-en.md index 618c7ac..fcc204d 100644 --- a/README-en.md +++ b/README-en.md @@ -16,7 +16,9 @@ The interface language follows the WinPE UI language (French or English). Themes - Optional Windows answer file (Unattend) generation, including computer name and local account configuration. - UEFI configuration, `winre.wim` copy, and WinRE registration and enablement. - Deployment progress, logging, and a copy of the log to the root of C: after an installation attempt. +- Manufacturer, model, serial number, firmware, and architecture are shown in the deployment progress window. - Interactive and command-line unattended deployment modes. +- Local version display and a quiet Gitea release check; a newer version appears in red without interrupting use. ## Requirements and files @@ -220,6 +222,7 @@ DeployCenter messages follow the WinPE language. DISM, DiskPart, and other Windo - `Modules/Configuration.psm1`: reading `DeployCenter.ini`. - `Modules/Logging.psm1`: logging and final log copy. - `Modules/Localization.psm1` and `Locales/*.psd1`: UI language and DeployCenter messages. +- `Modules/VersionCheck.psm1`: asynchronous Gitea release check that does not block the interface. - `Modules/ThemeManager.psm1` and `Themes/*.psd1`: UI color palettes. PSD1 profiles are configuration data; keep their structure and IDs consistent. PowerShell and profile files used by Windows PowerShell 5.1 should remain UTF-8 with BOM so accented characters are read correctly. diff --git a/README.md b/README.md index 877c666..dd50d7c 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,9 @@ L’interface est localisée selon la langue d’interface de WinPE (français o - Génération facultative d’un fichier de réponses Windows (Unattend), notamment pour configurer le nom d’hôte et un compte local. - Configuration UEFI, copie de `winre.wim`, enregistrement et activation de WinRE. - Progression du déploiement, journalisation et copie du journal à la racine de C: après une tentative d’installation. +- Affichage du constructeur, du modèle, du numéro de série, du firmware et de l’architecture dans la fenêtre de progression du déploiement. - Mode interactif ou déploiement automatisé en ligne de commande. +- Affichage de la version locale et vérification discrète des releases Gitea ; une version plus récente apparaît en rouge sans interrompre l’utilisation. ## Prérequis et fichiers @@ -220,6 +222,7 @@ Les messages de DeployCenter suivent la langue de WinPE. Les sorties DISM, DiskP - `Modules/Configuration.psm1` : lecture de `DeployCenter.ini`. - `Modules/Logging.psm1` : journalisation et copie finale du journal. - `Modules/Localization.psm1` et `Locales/*.psd1` : langue de l’interface et des messages DeployCenter. +- `Modules/VersionCheck.psm1` : vérification asynchrone des releases Gitea, sans bloquer l’interface. - `Modules/ThemeManager.psm1` et `Themes/*.psd1` : palettes de l’interface. Les profils PSD1 sont des données de configuration ; gardez leur structure et leurs identifiants cohérents. Les fichiers PowerShell et profils utilisés par Windows PowerShell 5.1 doivent rester encodés en UTF-8 avec BOM pour préserver correctement les caractères accentués. diff --git a/Unattend/Templates/OEMInstallation.xml b/Unattend/Templates/OEMInstallation.xml index 3670ce5..9b53d29 100644 --- a/Unattend/Templates/OEMInstallation.xml +++ b/Unattend/Templates/OEMInstallation.xml @@ -5,30 +5,37 @@ - - true - - + 1 + Disable BitLocker early + cmd.exe /c reg add "HKLM\SYSTEM\CurrentControlSet\Control\BitLocker" /v PreventDeviceEncryption /t REG_DWORD /d 1 /f + + + 2 Enable NumLock on the sign-in screen cmd.exe /c reg add "HKU\.DEFAULT\Control Panel\Keyboard" /v InitialKeyboardIndicators /t REG_SZ /d 2 /f - 2 + 3 Enable NumLock for new users cmd.exe /c reg load HKU\DeployCenterDefaultUser "%SystemDrive%\Users\Default\NTUSER.DAT" && reg add "HKU\DeployCenterDefaultUser\Control Panel\Keyboard" /v InitialKeyboardIndicators /t REG_SZ /d 2 /f && reg unload HKU\DeployCenterDefaultUser - 3 + 4 Disable hibernation cmd.exe /c powercfg.exe /hibernate off - 4 + 5 Disable automatic sleep on AC power cmd.exe /c powercfg.exe /change standby-timeout-ac 0 + + + 6 + Disable monitor timeout on AC power + cmd.exe /c powercfg.exe /change monitor-timeout-ac 0 @@ -66,6 +73,13 @@ + + + 1 + Security purge of unattend files containing passwords + cmd.exe /c del /q /f C:\Windows\Panther\unattend.xml & del /q /f C:\Windows\Panther\unattend\unattend.xml & del /q /f C:\Windows\Panther\UnattendGC\unattend.xml & del /q /f C:\Windows\System32\Sysprep\unattend.xml + +