From c82809920fd61e573fc2819527609995b0e734a5 Mon Sep 17 00:00:00 2001 From: Alex Hirsch Date: Tue, 4 Aug 2015 20:35:11 +0200 Subject: [PATCH] add disable-searchui script --- scripts/disable-searchui.ps1 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 scripts/disable-searchui.ps1 diff --git a/scripts/disable-searchui.ps1 b/scripts/disable-searchui.ps1 new file mode 100644 index 0000000..22afff7 --- /dev/null +++ b/scripts/disable-searchui.ps1 @@ -0,0 +1,14 @@ +# Description: +# This script will rename the Cortana app folder so SeachUI.exe cannot be +# started. + +taskkill.exe /F /IM "SearchUI.exe" + +# try to rename folder while SearchUI is restarting +foreach ($_ in (0..15)) { + if (Test-Path "$env:windir\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy") { + mv "$env:windir\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy" "$env:windir\SystemApps\_Microsoft.Windows.Cortana_cw5n1h2txyewy" + } else { + break + } +}