From b8bf972949e860203fcf49d0b09865158e7ed713 Mon Sep 17 00:00:00 2001 From: Alex Hirsch Date: Wed, 19 Aug 2015 12:42:41 +0200 Subject: [PATCH] suppress error on searchUI rename --- scripts/disable-searchui.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/disable-searchui.ps1 b/scripts/disable-searchui.ps1 index 22afff7..1273dbc 100644 --- a/scripts/disable-searchui.ps1 +++ b/scripts/disable-searchui.ps1 @@ -7,7 +7,9 @@ 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" + mv "$env:windir\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy" ` + "$env:windir\SystemApps\_Microsoft.Windows.Cortana_cw5n1h2txyewy" ` + -ErrorAction SilentlyContinue } else { break }