Add NoRestartExplorer switch (#370)

This commit is contained in:
oyxnaut
2025-11-07 22:13:53 +01:00
committed by GitHub
parent 75ef30e6fb
commit 791232e097
2 changed files with 3 additions and 1 deletions

View File

@@ -64,6 +64,7 @@ param (
[switch]$ExplorerToThisPC, [switch]$ExplorerToThisPC,
[switch]$ExplorerToDownloads, [switch]$ExplorerToDownloads,
[switch]$ExplorerToOneDrive, [switch]$ExplorerToOneDrive,
[switch]$NoRestartExplorer,
[switch]$DisableOnedrive, [switch]$HideOnedrive, [switch]$DisableOnedrive, [switch]$HideOnedrive,
[switch]$Disable3dObjects, [switch]$Hide3dObjects, [switch]$Disable3dObjects, [switch]$Hide3dObjects,
[switch]$DisableMusic, [switch]$HideMusic, [switch]$DisableMusic, [switch]$HideMusic,

View File

@@ -66,6 +66,7 @@ param (
[switch]$ExplorerToThisPC, [switch]$ExplorerToThisPC,
[switch]$ExplorerToDownloads, [switch]$ExplorerToDownloads,
[switch]$ExplorerToOneDrive, [switch]$ExplorerToOneDrive,
[switch]$NoRestartExplorer,
[switch]$DisableOnedrive, [switch]$HideOnedrive, [switch]$DisableOnedrive, [switch]$HideOnedrive,
[switch]$Disable3dObjects, [switch]$Hide3dObjects, [switch]$Disable3dObjects, [switch]$Hide3dObjects,
[switch]$DisableMusic, [switch]$HideMusic, [switch]$DisableMusic, [switch]$HideMusic,
@@ -641,7 +642,7 @@ function RegImport {
# Restart the Windows Explorer process # Restart the Windows Explorer process
function RestartExplorer { function RestartExplorer {
if ($script:Params.ContainsKey("Sysprep") -or $script:Params.ContainsKey("User")) { if ($script:Params.ContainsKey("Sysprep") -or $script:Params.ContainsKey("User") -or $script:Params.ContainsKey("NoRestartExplorer")) {
return return
} }