From cbd61902edb04b83eeee69c7fd983c9ec74bf12f Mon Sep 17 00:00:00 2001 From: Raphire <9938813+Raphire@users.noreply.github.com> Date: Thu, 2 Apr 2026 00:03:26 +0200 Subject: [PATCH] Set default launch mode to CLI for deployment-targeted parameters --- Win11Debloat.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Win11Debloat.ps1 b/Win11Debloat.ps1 index 94d48bb..cea80a7 100644 --- a/Win11Debloat.ps1 +++ b/Win11Debloat.ps1 @@ -361,6 +361,9 @@ if ((Test-Path $script:SavedSettingsFilePath) -and ([String]::IsNullOrWhiteSpace Remove-Item -Path $script:SavedSettingsFilePath -recurse } +# Default to CLI mode for deployment-targeted parameters. +$launchInCLI = $CLI -or $script:Params.ContainsKey("User") -or $script:Params.ContainsKey("Sysprep") -or $script:Params.ContainsKey("AppRemovalTarget") + # Only run the app selection form if the 'RunAppsListGenerator' parameter was passed to the script if ($RunAppsListGenerator) { PrintHeader "Custom Apps List Generator" @@ -409,7 +412,7 @@ if ((-not $script:Params.Count) -or $RunDefaults -or $RunDefaultsLite -or $RunSa } } else { - if ($CLI) { + if ($launchInCLI) { $Mode = ShowCLIMenuOptions } else {