mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-04-03 14:06:27 +00:00
Fix: Skip confirmation when running last used settings with -Silent parameter #521
This commit is contained in:
@@ -17,7 +17,6 @@ function ShowCLIDefaultModeOptions {
|
|||||||
|
|
||||||
PrintHeader 'Default Mode'
|
PrintHeader 'Default Mode'
|
||||||
|
|
||||||
# Add default settings based on user input
|
|
||||||
try {
|
try {
|
||||||
# Select app removal options based on user input
|
# Select app removal options based on user input
|
||||||
switch ($RemoveAppsInput) {
|
switch ($RemoveAppsInput) {
|
||||||
@@ -35,7 +34,6 @@ function ShowCLIDefaultModeOptions {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Load settings from DefaultSettings.json and add to params
|
|
||||||
LoadSettings -filePath $script:DefaultSettingsFilePath -expectedVersion "1.0"
|
LoadSettings -filePath $script:DefaultSettingsFilePath -expectedVersion "1.0"
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
@@ -45,8 +43,8 @@ function ShowCLIDefaultModeOptions {
|
|||||||
|
|
||||||
SaveSettings
|
SaveSettings
|
||||||
|
|
||||||
# Skip change summary if Silent parameter was passed
|
|
||||||
if ($Silent) {
|
if ($Silent) {
|
||||||
|
# Skip change summary and confirmation prompt
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ function ShowCLILastUsedSettings {
|
|||||||
PrintHeader 'Custom Mode'
|
PrintHeader 'Custom Mode'
|
||||||
|
|
||||||
try {
|
try {
|
||||||
# Load settings from LastUsedSettings.json and add to params
|
|
||||||
LoadSettings -filePath $script:SavedSettingsFilePath -expectedVersion "1.0"
|
LoadSettings -filePath $script:SavedSettingsFilePath -expectedVersion "1.0"
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
@@ -11,6 +10,11 @@ function ShowCLILastUsedSettings {
|
|||||||
AwaitKeyToExit
|
AwaitKeyToExit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($Silent) {
|
||||||
|
# Skip change summary and confirmation prompt
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
PrintPendingChanges
|
PrintPendingChanges
|
||||||
PrintHeader 'Custom Mode'
|
PrintHeader 'Custom Mode'
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user