From 3b67df711b40d43af12c9c8c095e7bde0c5718b3 Mon Sep 17 00:00:00 2001 From: zoicware <118035521+zoicware@users.noreply.github.com> Date: Mon, 10 Nov 2025 12:55:46 -0500 Subject: [PATCH] remove key press for noninteractive mode fix #38 --- RemoveWindowsAi.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/RemoveWindowsAi.ps1 b/RemoveWindowsAi.ps1 index 7ea6c04..2e07a22 100644 --- a/RemoveWindowsAi.ps1 +++ b/RemoveWindowsAi.ps1 @@ -2174,7 +2174,9 @@ if ($ogExecutionPolicy) { Reg.exe add 'HKLM\SOFTWARE\Policies\Microsoft\Windows\PowerShell' /v 'ExecutionPolicy' /t REG_SZ /d $ogExecutionPolicy /f >$null } +if (!$nonInteractive) { + Write-Host 'Done! Press Any Key to Exit...' -ForegroundColor Green + $Host.UI.RawUI.ReadKey() *>$null +} -Write-Host 'Done! Press Any Key to Exit...' -ForegroundColor Green -$Host.UI.RawUI.ReadKey() *>$null exit \ No newline at end of file