From 044b4e64a147d24f22df781ae813cf80eb5069c6 Mon Sep 17 00:00:00 2001 From: zoicware <118035521+zoicware@users.noreply.github.com> Date: Wed, 4 Feb 2026 13:17:55 -0500 Subject: [PATCH] try to prevent search host from running again before loading settings.dat --- RemoveWindowsAi.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RemoveWindowsAi.ps1 b/RemoveWindowsAi.ps1 index 61b6a5c..5092adc 100644 --- a/RemoveWindowsAi.ps1 +++ b/RemoveWindowsAi.ps1 @@ -1040,6 +1040,11 @@ Windows Registry Editor Version 5.00 Value = @('1', '0')[$revert] # 1 = disable 0 = enable Type = '5f5e10b' } + #search host likes to come back and sometimes prevents the dat file from being loaded + if (Get-Process -Name SearchHost -ErrorAction SilentlyContinue) { + Stop-Process -Name @('SearchHost', 'AppActions') -Force -ErrorAction SilentlyContinue + } + $setting | Set-UwpAppRegistryEntry -FilePath $settingsDat }