mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-06-10 10:36:26 +00:00
Add confirmation dialogs & warning for Windows Terminal Removal
Removal of this app can cause Win11Debloat to fail, if the script is launched via Windows Terminal
This commit is contained in:
@@ -1773,15 +1773,11 @@ function Show-MainWindow {
|
||||
$selectedApps = @($selectedApps | Where-Object { $_ } | Select-Object -Unique)
|
||||
|
||||
if ($selectedApps.Count -gt 0) {
|
||||
# Check if Microsoft Store is selected
|
||||
if ($selectedApps -contains "Microsoft.WindowsStore") {
|
||||
$result = Show-MessageBox -Message 'Are you sure you wish to uninstall the Microsoft Store? This app cannot easily be reinstalled.' -Title 'Are you sure?' -Button 'YesNo' -Icon 'Warning'
|
||||
|
||||
if ($result -eq 'No') {
|
||||
return
|
||||
}
|
||||
if (-not (ConfirmUnsafeAppRemoval -SelectedApps $selectedApps -Owner $window)) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
AddParameter 'RemoveApps'
|
||||
AddParameter 'Apps' ($selectedApps -join ',')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user