Ajout de la langue anglaise

Ajout d'un README.md avec le descriptif et les instructions
L'ancien README.md s'appelle désormais CHANGELOG.md
Activation du pavé numérique par défaut pour les installations sans assistance
Nouveau design pour la fenêtre de déploiement.
Ajout de paramètre pour pouvoir procéder à une installation totalement automatisée
Ajout de paramètre pour copier au choix sources, drivers ou les deux sur C:\DeployVenter avant leur usage par DISM.
This commit is contained in:
benoit committed 2026-10-18 04:14:17 +02:00
1 parent cb917c97ce
commit 2212e25d31
26 files changed
+2625 -830

No files matched your search

+37 -37
View File
@@ -1,5 +1,5 @@
# DeployCenter - Recherche et lecture des sources Windows
# Compatible Windows PowerShell 5.1
# DeployCenter - Find and read Windows sources
# Compatible with Windows PowerShell 5.1
function Find-WindowsSources {
param(
@@ -14,20 +14,20 @@ function Find-WindowsSources {
$candidate
} | Where-Object { -not [string]::IsNullOrWhiteSpace($_) } | Select-Object -Unique)
if ($roots.Count -eq 0) {
throw 'Indique au moins un chemin local et/ou un partage SMB, separes par un point-virgule.'
throw 'Specify at least one local path and/or SMB share, separated by semicolons.'
}
foreach ($root in $roots) {
if (-not (Test-Path -LiteralPath $root -PathType Container)) {
if ($LogAction) { & $LogAction "Source inaccessible, ignoree : $root" 'WARNING' }
if ($LogAction) { & $LogAction "Source inaccessible, skipped: $root" 'WARNING' }
continue
}
if ($LogAction) { & $LogAction "Recherche des sources Windows dans : $root" 'INFO' }
# Parcours en lecture seule. Les erreurs d'acces aux sous-dossiers sont ignorees.
# Afficher les ISO et les fichiers WIM/ESD autonomes.
# Exception : masquer boot.wim uniquement lorsqu'il fait partie d'un
# support Windows extrait dont le même dossier Sources contient install.wim/esd.
if ($LogAction) { & $LogAction "Searching for Windows sources in: $root" 'INFO' }
# Read-only scan. Errors accessing subfolders are ignored.
# Show ISO files and standalone WIM/ESD files.
# Exception: hide boot.wim only when it is part of an
# extracted Windows medium whose Sources folder also contains install.wim/esd.
$allFiles = @(Get-ChildItem -LiteralPath $root -Recurse -File -ErrorAction SilentlyContinue)
$files = New-Object System.Collections.Generic.List[object]
foreach ($file in $allFiles) {
@@ -62,24 +62,24 @@ function Find-WindowsSources {
'.esd' { 'Image ESD Windows' }
}
$detail = if ($file.Name -ieq 'install.wim' -or $file.Name -ieq 'install.esd') {
"Image d’installation dans un support extrait"
"Installation image on extracted media"
} elseif ($file.Extension -ieq '.iso') {
"Support d’installation ISO"
"ISO installation media"
} else {
"Image WIM/ESD autonome"
}
$results.Add([pscustomobject]@{
Type = $kind; Nom = $file.Name; Chemin = $file.FullName
Taille = ('{0:N2} Go' -f ($file.Length / 1GB)); Detail = $detail
Type = $kind; Name = $file.Name; Path = $file.FullName
Size = ('{0:N2} GB' -f ($file.Length / 1GB)); Detail = $detail
})
}
}
if (-not ($roots | Where-Object { Test-Path -LiteralPath $_ -PathType Container })) {
throw "Aucun des chemins n'est accessible : $($roots -join '; ')`nVerifie que le lecteur local et le partage SMB sont accessibles."
throw "None of the paths is accessible: $($roots -join '; ')`nCheck that the local drive and SMB share are available."
}
if ($LogAction) { & $LogAction ("Detection terminee : {0} element(s) trouve(s)." -f $results.Count) 'SUCCESS' }
return @($results | Sort-Object Type, Nom, Chemin -Unique)
if ($LogAction) { & $LogAction ("Detection complete: {0} element(s) trouve(s)." -f $results.Count) 'SUCCESS' }
return @($results | Sort-Object Type, Name, Path -Unique)
}
function Get-WindowsImageEditions {
@@ -89,7 +89,7 @@ function Get-WindowsImageEditions {
)
if (-not (Test-Path -LiteralPath $ImagePath -PathType Leaf)) {
throw "Fichier image introuvable : $ImagePath"
throw "Image file not found: $ImagePath"
}
$normalized = @()
@@ -138,18 +138,18 @@ function Get-WindowsImageEditions {
}
}
} catch {
if ($LogAction) { & $LogAction "Get-WindowsImage indisponible pour $ImagePath : $($_.Exception.Message)" 'WARNING' }
if ($LogAction) { & $LogAction "Get-WindowsImage unavailable for $ImagePath : $($_.Exception.Message)" 'WARNING' }
}
}
$dism = Join-Path $env:WINDIR 'System32\dism.exe'
if (-not (Test-Path -LiteralPath $dism)) { $dism = 'dism.exe' }
# Si le module PowerShell n'a pas renvoyé les index/noms, les récupérer avec DISM.
# If the PowerShell module did not return indexes/names, retrieve them with DISM.
if ($normalized.Count -eq 0) {
$output = & $dism /English /Get-WimInfo "/WimFile:$ImagePath" 2>&1
if ($LASTEXITCODE -ne 0) {
throw "DISM n'a pas pu lire l'image : $ImagePath`n$($output -join "`n")"
throw "DISM could not read the image: $ImagePath`n$($output -join "`n")"
}
$current = $null
@@ -168,17 +168,17 @@ function Get-WindowsImageEditions {
}
if ($normalized.Count -eq 0) {
throw "DISM n’a retourné aucune édition exploitable pour : $ImagePath"
throw "DISM returned no usable editions for: $ImagePath"
}
# Interroger DISM pour chaque index même si Get-WindowsImage a fourni les noms :
# selon la version du module, les propriétés Architecture/Version peuvent être absentes.
# Query DISM for every index even if Get-WindowsImage returned the names:
# Architecture/Version properties may be missing in some module versions.
foreach ($edition in $normalized) {
if ($edition.Architecture -and $edition.Version) { continue }
$detailOutput = & $dism /English /Get-WimInfo "/WimFile:$ImagePath" "/Index:$($edition.Index)" 2>&1
if ($LASTEXITCODE -ne 0) {
if ($LogAction) { & $LogAction "DISM n'a pas pu lire les metadonnees de l'index $($edition.Index) : $($detailOutput -join ' ')" 'WARNING' }
if ($LogAction) { & $LogAction "DISM could not read metadata for index $($edition.Index) : $($detailOutput -join ' ')" 'WARNING' }
continue
}
@@ -191,7 +191,7 @@ function Get-WindowsImageEditions {
$insideImageDetails = $true
continue
}
# Ignorer la version de DISM affichée au début de sa sortie.
# Ignore the DISM version printed at the start of its output.
if (-not $insideImageDetails) { continue }
if (-not $edition.Architecture -and $detailText -match '^\s*Architecture\s*:\s*(.*?)\s*$') {
@@ -215,8 +215,8 @@ function Get-WindowsImageEditions {
}
}
# Version globale de l'image : ne l'afficher que si les métadonnées des index
# donnent une seule version cohérente. Ne pas répéter cette valeur sur chaque ligne.
# Overall image version: show it only if the index metadata
# reports one consistent version. Do not repeat it on every row.
$versionValues = @($normalized | ForEach-Object {
if (-not [string]::IsNullOrWhiteSpace([string]$_.Version)) { [string]$_.Version }
} | Select-Object -Unique)
@@ -259,7 +259,7 @@ function Resolve-InstallImagePath {
return [pscustomobject]@{ SourcePath = $SelectedPath; ImagePath = $candidate; MountedImage = $null }
}
}
throw "Aucun fichier Sources\install.wim ou Sources\install.esd dans : $SelectedPath"
throw "No Sources\install.wim or Sources\install.esd file in: $SelectedPath"
}
if ([IO.Path]::GetExtension($SelectedPath) -ieq '.iso') {
@@ -269,9 +269,9 @@ function Resolve-InstallImagePath {
return $ExistingImage
}
if (-not (Get-Command Mount-DiskImage -ErrorAction SilentlyContinue)) {
throw "Le montage ISO n'est pas disponible dans cet environnement (commande Mount-DiskImage absente). Pour analyser cette source, utilise le dossier extrait ou un fichier install.wim/esd."
throw "ISO mounting is unavailable in this environment (Mount-DiskImage command not found). Use an extracted folder or an install.wim/esd file to analyze this source."
}
# Ne pas laisser Windows attribuer une lettre arbitraire (souvent D:) à l'ISO.
# Do not let Windows assign an arbitrary drive letter (often D:) to the ISO.
$diskImage = Mount-DiskImage -ImagePath $SelectedPath -Access ReadOnly -NoDriveLetter -PassThru -ErrorAction Stop
$mountInfo = [pscustomobject]@{
SourcePath = $SelectedPath
@@ -281,10 +281,10 @@ function Resolve-InstallImagePath {
DriveLetter = $null
}
try {
# Partir des volumes explicitement associés à cette image évite de
# confondre le lecteur CDROM virtuel et un disque physique dans WinPE.
# Start with the volumes explicitly associated with this image to avoid
# confusing the virtual CD-ROM drive with a physical disk in WinPE.
$volumes = @(Get-Volume -DiskImage $diskImage -ErrorAction Stop)
if ($volumes.Count -eq 0) { throw 'Aucun volume ISO expose par Windows.' }
if ($volumes.Count -eq 0) { throw 'Windows did not expose any ISO volumes.' }
$usedLetters = @(
Get-Volume -ErrorAction SilentlyContinue | Where-Object { $_.DriveLetter } | ForEach-Object { ([string]$_.DriveLetter).ToUpperInvariant() }
Get-PSDrive -PSProvider FileSystem -ErrorAction SilentlyContinue | ForEach-Object { ([string]$_.Name).ToUpperInvariant() }
@@ -296,7 +296,7 @@ function Resolve-InstallImagePath {
break
}
}
if (-not $availableLetter) { throw 'Aucune lettre de lecteur temporaire disponible pour le montage ISO.' }
if (-not $availableLetter) { throw 'No temporary drive letter is available to mount the ISO.' }
$checkedPaths = @()
foreach ($volume in $volumes) {
@@ -319,7 +319,7 @@ function Resolve-InstallImagePath {
$mountVolCommand = Join-Path $env:WINDIR 'System32\mountvol.exe'
if (-not (Test-Path -LiteralPath $mountVolCommand -PathType Leaf)) { $mountVolCommand = 'mountvol.exe' }
$removeOutput = & $mountVolCommand 'D:\' '/D' 2>&1
if ($LASTEXITCODE -ne 0) { throw "Impossible de libérer D: pour le volume ISO : $($removeOutput -join ' ')" }
if ($LASTEXITCODE -ne 0) { throw "Could not release D: for the ISO volume: $($removeOutput -join ' ')" }
}
$mountInfo.ImagePath = $candidate
return $mountInfo
@@ -358,14 +358,14 @@ function Resolve-InstallImagePath {
$mountInfo.MountedPartition = $null
$mountInfo.DriveLetter = $null
}
throw "Aucun fichier Sources\install.wim ou Sources\install.esd trouvé dans l'ISO. Chemins vérifiés : $($checkedPaths -join ', ')."
throw "No Sources\install.wim or Sources\install.esd file was found in the ISO. Checked paths: $($checkedPaths -join ', ')."
} catch {
try { [void](Dismount-DeployCenterInstallImage -Image $mountInfo -ErrorAction SilentlyContinue) } catch { }
throw
}
}
throw "Type de source non pris en charge pour l'analyse : $SelectedPath"
throw "Unsupported source type for analysis: $SelectedPath"
}
function Dismount-DeployCenterInstallImage {