From 58d47c77cc1d31da8a6962d3c596cda916dd7514 Mon Sep 17 00:00:00 2001 From: Raphire <9938813+Raphire@users.noreply.github.com> Date: Mon, 22 Sep 2025 21:41:24 +0200 Subject: [PATCH] Remove prompts after system restore creation errors --- Win11Debloat.ps1 | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Win11Debloat.ps1 b/Win11Debloat.ps1 index 6ffa1ba..b615c3c 100644 --- a/Win11Debloat.ps1 +++ b/Win11Debloat.ps1 @@ -851,7 +851,6 @@ function CreateSystemRestorePoint { Enable-ComputerRestore -Drive "$env:SystemDrive" } catch { Write-Host "Error: Failed to enable System Restore: $_" -ForegroundColor Red - Write-Output "" return } } @@ -860,9 +859,6 @@ function CreateSystemRestorePoint { if (-not $enableSystemRestoreJobDone) { Write-Host "Error: Failed to enable system restore and create restore point, operation timed out" -ForegroundColor Red - Write-Output "" - Write-Output "Press any key to continue anyway..." - $null = [System.Console]::ReadKey() return } else { Receive-Job $enableSystemRestoreJob @@ -879,7 +875,6 @@ function CreateSystemRestorePoint { $recentRestorePoints = Get-ComputerRestorePoint | Where-Object { (Get-Date) - [System.Management.ManagementDateTimeConverter]::ToDateTime($_.CreationTime) -le (New-TimeSpan -Hours 24) } } catch { Write-Host "Error: Unable to retrieve existing restore points: $_" -ForegroundColor Red - Write-Output "" return } @@ -899,9 +894,6 @@ function CreateSystemRestorePoint { if (-not $createRestorePointJobDone) { Write-Host "Error: Failed to create system restore point, operation timed out" -ForegroundColor Red - Write-Output "" - Write-Output "Press any key to continue anyway..." - $null = [System.Console]::ReadKey() } else { Receive-Job $createRestorePointJob }