Correction de la façon de désactiver Bitlocker

Désactivation du délai écran noir sur secteur
Suppression de unattend.xml qui reste par endroit avec le mot de passe admin
Mise en place du numéro de version dans le pied de page à droite.
Reste à finaliser le contrôle de mise à jour disponible.
This commit is contained in:
benoit committed 2026-10-19 20:44:58 +02:00
1 parent 5a121718d4
commit a765701fed
8 files changed
+249 -19

No files matched your search

+5 -1
View File
@@ -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`.
+54 -3
View File
@@ -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()
}
+2
View File
@@ -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 "
+84 -9
View File
@@ -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 = 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.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 = $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()
+78
View File
@@ -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?(?<Numeric>\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
+3
View File
@@ -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.
+3
View File
@@ -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.
+20 -6
View File
@@ -5,30 +5,37 @@
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<ComputerName></ComputerName>
</component>
<component name="microsoft-windows-securestartup-filterdriver-" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<PreventDeviceEncryption>true</PreventDeviceEncryption>
</component>
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Description>Disable BitLocker early</Description>
<Path>cmd.exe /c reg add "HKLM\SYSTEM\CurrentControlSet\Control\BitLocker" /v PreventDeviceEncryption /t REG_DWORD /d 1 /f</Path>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>2</Order>
<Description>Enable NumLock on the sign-in screen</Description>
<Path>cmd.exe /c reg add "HKU\.DEFAULT\Control Panel\Keyboard" /v InitialKeyboardIndicators /t REG_SZ /d 2 /f</Path>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>2</Order>
<Order>3</Order>
<Description>Enable NumLock for new users</Description>
<Path>cmd.exe /c reg load HKU\DeployCenterDefaultUser "%SystemDrive%\Users\Default\NTUSER.DAT" &amp;&amp; reg add "HKU\DeployCenterDefaultUser\Control Panel\Keyboard" /v InitialKeyboardIndicators /t REG_SZ /d 2 /f &amp;&amp; reg unload HKU\DeployCenterDefaultUser</Path>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>3</Order>
<Order>4</Order>
<Description>Disable hibernation</Description>
<Path>cmd.exe /c powercfg.exe /hibernate off</Path>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>4</Order>
<Order>5</Order>
<Description>Disable automatic sleep on AC power</Description>
<Path>cmd.exe /c powercfg.exe /change standby-timeout-ac 0</Path>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>6</Order>
<Description>Disable monitor timeout on AC power</Description>
<Path>cmd.exe /c powercfg.exe /change monitor-timeout-ac 0</Path>
</RunSynchronousCommand>
</RunSynchronous>
</component>
@@ -66,6 +73,13 @@
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<Order>1</Order>
<Description>Security purge of unattend files containing passwords</Description>
<CommandLine>cmd.exe /c del /q /f C:\Windows\Panther\unattend.xml &amp; del /q /f C:\Windows\Panther\unattend\unattend.xml &amp; del /q /f C:\Windows\Panther\UnattendGC\unattend.xml &amp; del /q /f C:\Windows\System32\Sysprep\unattend.xml</CommandLine>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>
</unattend>