mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-04-03 22:16:30 +00:00
Add error handling for ExecuteAllChanges to improve robustness
This commit is contained in:
@@ -468,9 +468,17 @@ if (($controlParamsCount -eq $script:Params.Keys.Count) -or ($script:Params.Keys
|
|||||||
AwaitKeyToExit
|
AwaitKeyToExit
|
||||||
}
|
}
|
||||||
|
|
||||||
# Execute all selected/provided parameters using the consolidated function
|
try {
|
||||||
# (This also handles restore point creation if requested)
|
# Execute all selected/provided parameters using the consolidated function
|
||||||
ExecuteAllChanges
|
# (This also handles restore point creation if requested)
|
||||||
|
ExecuteAllChanges
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Error "An error occurred while applying changes: $_"
|
||||||
|
|
||||||
|
AwaitKeyToExit
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
RestartExplorer
|
RestartExplorer
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user