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:
1 parent
cb917c97ce
commit
2212e25d31
26 files changed
+2625
-830
No files matched your search
+31
-5
@@ -1,5 +1,5 @@
|
||||
# DeployCenter - Gestion des journaux
|
||||
# Compatible Windows PowerShell 5.1
|
||||
# DeployCenter - Log management
|
||||
# Compatible with Windows PowerShell 5.1
|
||||
|
||||
function Initialize-DeployCenterLogging {
|
||||
[CmdletBinding()]
|
||||
@@ -16,11 +16,11 @@ function Initialize-DeployCenterLogging {
|
||||
New-Item -Path $script:LogRoot -ItemType Directory -Force -ErrorAction Stop | Out-Null
|
||||
}
|
||||
|
||||
# L'adresse IPv4 est fournie par Modules\\Network.psm1.
|
||||
# The IPv4 address is provided by Modules\\Network.psm1.
|
||||
$script:LogIPv4 = $IPv4
|
||||
|
||||
$logIpTag = if ([string]::IsNullOrWhiteSpace($script:LogIPv4)) {
|
||||
'sans-ip'
|
||||
'no-ip'
|
||||
} else {
|
||||
$script:LogIPv4 -replace '[^0-9A-Za-z.-]', '_'
|
||||
}
|
||||
@@ -48,7 +48,7 @@ function Write-Log {
|
||||
[System.Text.Encoding]::UTF8
|
||||
)
|
||||
} catch {
|
||||
# Le journal graphique reste disponible si le fichier n'est pas accessible.
|
||||
# The graphical log remains available if the file cannot be accessed.
|
||||
}
|
||||
|
||||
if ($null -ne $script:txtLog -and -not $script:txtLog.IsDisposed) {
|
||||
@@ -57,3 +57,29 @@ function Write-Log {
|
||||
$script:txtLog.ScrollToCaret()
|
||||
}
|
||||
}
|
||||
|
||||
function Copy-DeployCenterLog {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string]$DestinationRoot
|
||||
)
|
||||
|
||||
if ([string]::IsNullOrWhiteSpace([string]$script:LogFile) -or
|
||||
-not (Test-Path -LiteralPath $script:LogFile -PathType Leaf)) {
|
||||
Write-Log -Message (ConvertTo-DeployCenterLocalizedLogMessage -Message 'Log copy skipped: no log file is available.') -Level 'WARNING'
|
||||
return $null
|
||||
}
|
||||
|
||||
try {
|
||||
if (-not (Test-Path -LiteralPath $DestinationRoot -PathType Container)) {
|
||||
throw "Destination folder is not accessible: $DestinationRoot"
|
||||
}
|
||||
$destinationPath = Join-Path $DestinationRoot ([System.IO.Path]::GetFileName($script:LogFile))
|
||||
Write-Log -Message (ConvertTo-DeployCenterLocalizedLogMessage -Message "Copying the log to $destinationPath.") -Level 'INFO'
|
||||
Copy-Item -LiteralPath $script:LogFile -Destination $destinationPath -Force -ErrorAction Stop | Out-Null
|
||||
return $destinationPath
|
||||
} catch {
|
||||
Write-Log -Message (ConvertTo-DeployCenterLocalizedLogMessage -Message "Unable to copy the log to '$DestinationRoot' : $($_.Exception.Message)") -Level 'WARNING'
|
||||
return $null
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user