Windows 10 recherche ne fonctionne pas - RechercheUI.exe manquant

When I try to access the Windows 10 search function (either by clicking sur le bar dans le task bar or starting to tapez dans le menu Démarrer), rien happens; The search “window” ne pop up.

I investigated sur mon own and found a few points that may cause this problème:

  • J’ai utilisé SpyBot Anti-Beacon to prevent Windows (and Cortana) from accessing Bing and telemetry websites. Even when undoing all changes made by that programme and restarting the ordinateur, no changes are visible.

  • Some group policies were modified via gpedit.msc which affect Cortana and the Windows Search. Après resetting those policies vers le par défaut valeur (“Not Configured”) and restarting, no changes are noticeable.

The répertoire for Cortana in C:\Windows\SystemApps ne exist. This également means that a fichier named SearchUI.exe ne exist parce que it devrait être contained in that dossier. The Gestionnaire des tâches neither shows a running processus for SearchUI.exe nor for Cortana. When trying to reinstall all factory-set système apps in an elevated PowerShell instance avec the command

Get-AppXPackage | Foreach {Add-AppXPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"

(which was found here) all apps except for Cortana are reinstalled. When executing Get-AppXPackage *cortana*, no package is found or output, but par exemple Get-AppXPackage *edge* yields a result.

I suppose the critical erreur is that SearchUI.exe (and, in fact, the whole remaining Cortana répertoire) is manquant depuis le système. Even après running Windows Mise à jour and l’installation all disponible mises à jour, the problème persists.

Is there any way Je peux restore the search fonctionnalité to how c’est supposed to be?

OS: Windows 10 Pro x64 (Build 14393.187)


Source : Super User

Microsoft provided a solution to reset Windows search via a powershell script and a set of steps found here under “Reset Windows Search.” I’m including the steps ainsi que the contents du powershell script “ResetWindowsSearchBox.ps1” below.

Si le Windows 10 May 2019 Mise à jour or a later mise à jour is installé, use Windows PowerShell to reset Windows Search. To do this, follow these steps.

Remarque You must have administrator autorisations to run this script.

  • Cliquez sur le Télécharger bouton and save ResetWindowsSearchBox.ps1 to a local dossier.

  • Faites un clic droit the fichier that you saved, and sélectionner Run avec PowerShell.

  • Si vous are asked “Do you want to allow this app to make changes to your périphérique?,” sélectionner Oui.

  • The PowerShell script resets the Windows Search fonctionnalité. When the word “Done” appears, close the PowerShell window.

Si vous receive a “Cannot be loaded parce que running scripts is désactivé on this système” erreur message, enter the following command sur le ligne de commande du PowerShell window, and ensuite appuyez sur Enter:

Get-ExecutionPolicy

Remarque The current policy appears dans le window. Par exemple, you might see Restricted. We recommend that you note this valeur parce que vous allez have to use it later.

Entrez the following command sur le ligne de commande du PowerShell window, and ensuite appuyez sur Enter:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted

Remarque Vous allez receive a warning message that explains the sécurité risks of an execution policy change. Appuyez sur Y, and ensuite appuyez sur Entrez to accept the change.
To learn more about PowerShell execution policies, see About Execution Policies.

  • Après the policy change is completed, close the window, and ensuite repeat steps 2–4. Cependant, when the “Done” message appears this time, DON’T close the PowerShell window. À la place, appuyez sur any clé to continue.

Revert to your previous PowerShell execution policy setting. To do this, enter the following command sur le ligne de commande du PowerShell window, appuyez sur the Spacebar, enter the policy valeur that you noted in step 5, and ensuite appuyez sur Enter:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy

Par exemple, si le policy that you noted in step 5 was Restricted, the command would resemble the following:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Restricted

Remarque Vous allez receive a warning message that explains the sécurité risks of an execution policy change. Appuyez sur Y, and ensuite appuyez sur Entrez to accept the change and revert to your previous policy setting.

  • Fermez le PowerShell window.

[10. Redémarrer PC]¹

Remarque If your organization has désactivé the ability to run scripts, contact your administrator for help.

¹ Added step 10 depuis this fix n’a pas take effect until I redémarré.

ResetWindowsSearchBox.ps1

# Copyright © 2019, Microsoft Corporation. All rights reserved.

function T-R
{
    [CmdletBinding()]
    Param(
        [String] $n
    )

    $o = Get-Item -LiteralPath $n -ErrorAction SilentlyContinue
    return ($o -ne $null)
}

function R-R
{
    [CmdletBinding()]
    Param(
        [String] $l
    )

    $m = T-R $l
    if ($m) {
        Remove-Item -Path $l -Recurse -ErrorAction SilentlyContinue
    }
}

function S-D {
    R-R "HKLM:\SOFTWARE\Microsoft\Cortana\Testability"
    R-R "HKLM:\SOFTWARE\Microsoft\Search\Testability"
}

function K-P {
    [CmdletBinding()]
    Param(
        [String] $g
    )

    $h = Get-Process $g -ErrorAction SilentlyContinue

    $i = $(get-date).AddSeconds(2)
    $k = $(get-date)

    while ((($i - $k) -gt 0) -and $h) {
        $k = $(get-date)

        $h = Get-Process $g -ErrorAction SilentlyContinue
        if ($h) {
            $h.CloseMainWindow() | Out-Null
            Stop-Process -Id $h.Id -Force
        }

        $h = Get-Process $g -ErrorAction SilentlyContinue
    }
}

function D-FF {
    [CmdletBinding()]
    Param(
        [string[]] $e
    )

    foreach ($f in $e) {
        if (Test-Path -Path $f) {
            Remove-Item -Recurse -Force $f -ErrorAction SilentlyContinue
        }
    }
}

function D-W {

    $d = @("$Env:localappdata\Packages\Microsoft.Cortana_8wekyb3d8bbwe\AC\AppCache",
        "$Env:localappdata\Packages\Microsoft.Cortana_8wekyb3d8bbwe\AC\INetCache",
        "$Env:localappdata\Packages\Microsoft.Cortana_8wekyb3d8bbwe\AC\INetCookies",
        "$Env:localappdata\Packages\Microsoft.Cortana_8wekyb3d8bbwe\AC\INetHistory",
        "$Env:localappdata\Packages\Microsoft.Windows.Cortana_cw5n1h2txyewy\AC\AppCache",
        "$Env:localappdata\Packages\Microsoft.Windows.Cortana_cw5n1h2txyewy\AC\INetCache",
        "$Env:localappdata\Packages\Microsoft.Windows.Cortana_cw5n1h2txyewy\AC\INetCookies",
        "$Env:localappdata\Packages\Microsoft.Windows.Cortana_cw5n1h2txyewy\AC\INetHistory",
        "$Env:localappdata\Packages\Microsoft.Search_8wekyb3d8bbwe\AC\AppCache",
        "$Env:localappdata\Packages\Microsoft.Search_8wekyb3d8bbwe\AC\INetCache",
        "$Env:localappdata\Packages\Microsoft.Search_8wekyb3d8bbwe\AC\INetCookies",
        "$Env:localappdata\Packages\Microsoft.Search_8wekyb3d8bbwe\AC\INetHistory",
        "$Env:localappdata\Packages\Microsoft.Windows.Search_cw5n1h2txyewy\AC\AppCache",
        "$Env:localappdata\Packages\Microsoft.Windows.Search_cw5n1h2txyewy\AC\INetCache",
        "$Env:localappdata\Packages\Microsoft.Windows.Search_cw5n1h2txyewy\AC\INetCookies",
        "$Env:localappdata\Packages\Microsoft.Windows.Search_cw5n1h2txyewy\AC\INetHistory")

    D-FF $d
}

function R-L {
    [CmdletBinding()]
    Param(
        [String] $c
    )

    K-P $c 2>&1 | out-null
    D-W # 2>&1 | out-null
    K-P $c 2>&1 | out-null

    Start-Sleep -s 5
}

function D-E {
    Write-Host "Press any key to continue..."
    $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyUp") > $null
}

Write-Output "Verifying that the script is running elevated"
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
 if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) {
  $Cx = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments
  Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList "-noexit",$Cx
  Exit
 }
}

$a = "searchui"
$b = "$Env:localappdata\Packages\Microsoft.Windows.Search_cw5n1h2txyewy"
if (Test-Path -Path $b) {
    $a = "searchapp"
} 

Write-Output "Resetting Windows Search Box"
S-D 2>&1 | out-null
R-L $a

Write-Output "Done..."
D-E