From 791232e0973057d9e235d1d0427980c198cc1977 Mon Sep 17 00:00:00 2001 From: oyxnaut <49397052+oyxnaut@users.noreply.github.com> Date: Fri, 7 Nov 2025 22:13:53 +0100 Subject: [PATCH] Add NoRestartExplorer switch (#370) --- Get.ps1 | 1 + Win11Debloat.ps1 | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Get.ps1 b/Get.ps1 index 8d1efe0..9494dfd 100644 --- a/Get.ps1 +++ b/Get.ps1 @@ -64,6 +64,7 @@ param ( [switch]$ExplorerToThisPC, [switch]$ExplorerToDownloads, [switch]$ExplorerToOneDrive, + [switch]$NoRestartExplorer, [switch]$DisableOnedrive, [switch]$HideOnedrive, [switch]$Disable3dObjects, [switch]$Hide3dObjects, [switch]$DisableMusic, [switch]$HideMusic, diff --git a/Win11Debloat.ps1 b/Win11Debloat.ps1 index 71c8ae1..c4708e3 100755 --- a/Win11Debloat.ps1 +++ b/Win11Debloat.ps1 @@ -66,6 +66,7 @@ param ( [switch]$ExplorerToThisPC, [switch]$ExplorerToDownloads, [switch]$ExplorerToOneDrive, + [switch]$NoRestartExplorer, [switch]$DisableOnedrive, [switch]$HideOnedrive, [switch]$Disable3dObjects, [switch]$Hide3dObjects, [switch]$DisableMusic, [switch]$HideMusic, @@ -641,7 +642,7 @@ function RegImport { # Restart the Windows Explorer process 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 }