refactor: rename NoRestartExplorer parameter to SkipExplorerRestart (#709)

The old `NoRestartExplorer` parameter is kept as an alias and will
continue to work, but is considered deprecated
This commit is contained in:
Jeffrey
2026-07-19 22:58:03 +02:00
committed by GitHub
parent 9c033dbf98
commit a9c1736e46
7 changed files with 20 additions and 9 deletions
+2 -2
View File
@@ -12,8 +12,8 @@ function Invoke-RestartExplorer {
}
Write-Host "> Attempting to restart the Windows Explorer process to apply all changes..."
if ($script:Params.ContainsKey("NoRestartExplorer")) {
if ($script:Params.ContainsKey('SkipExplorerRestart')) {
Write-Host "Explorer process restart was skipped, please manually reboot your PC to apply all changes" -ForegroundColor Yellow
return
}
+1 -1
View File
@@ -777,7 +777,7 @@ function Show-MainWindow {
}
$restartExplorerCheckBox = $window.FindName('RestartExplorerCheckBox')
if ($restartExplorerCheckBox -and $script:Params.ContainsKey("NoRestartExplorer")) {
if ($restartExplorerCheckBox -and $script:Params.ContainsKey('SkipExplorerRestart')) {
$restartExplorerCheckBox.IsChecked = $false
$restartExplorerCheckBox.IsEnabled = $false
}
+2 -1
View File
@@ -7,7 +7,8 @@ param (
[switch]$Sysprep,
[string]$LogPath,
[string]$User,
[switch]$NoRestartExplorer,
[Alias('NoRestartExplorer')]
[switch]$SkipExplorerRestart,
[switch]$CreateRestorePoint,
[switch]$RunDefaults,
[switch]$RunDefaultsLite,
+1 -1
View File
@@ -82,7 +82,7 @@ function Import-ConfigToParams {
}
if ($deploymentLookup.ContainsKey('RestartExplorer') -and -not [bool]$deploymentLookup['RestartExplorer']) {
Add-Parameter 'NoRestartExplorer'
Add-Parameter 'SkipExplorerRestart'
$importedItems++
}