diff --git a/RemoveWindowsAi.ps1 b/RemoveWindowsAi.ps1 index e371789..2ed7beb 100644 --- a/RemoveWindowsAi.ps1 +++ b/RemoveWindowsAi.ps1 @@ -70,25 +70,6 @@ If (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]: Add-Type -AssemblyName PresentationFramework Add-Type -AssemblyName System.Windows.Forms -Function Wait-ForKeyOrTimeout { - param ( - [int]$Timeout = 10 - ) - - for ($i = $Timeout; $i -ge 0; $i--) { - Write-Host -NoNewline "`rPress any key to close... (Closing in $i seconds) " - - if ([System.Console]::KeyAvailable) { - [void][System.Console]::ReadKey($true) - Write-Host "`rKey pressed, exiting countdown... " # Clear line with spaces - return - } - - Start-Sleep -Seconds 1 - } - Write-Host "`rPress any key to close... (Closing in 0 seconds) " # Clear the last countdown -} - function Run-Trusted([String]$command, $psversion) { if ($psversion -eq 7) { @@ -2083,6 +2064,4 @@ if ($ogExecutionPolicy) { Reg.exe add 'HKLM\SOFTWARE\Policies\Microsoft\Windows\PowerShell' /v 'ExecutionPolicy' /t REG_SZ /d $ogExecutionPolicy /f >$null } - -Wait-ForKeyOrTimeout -Timeout 3 exit \ No newline at end of file