Skip to content

WSearch: The Windows Search Service (SearchIndexer.exe)

What the WSearch service is, its processes and index files, how to check, stop, disable or rebuild it, and the registry and event log traces each change leaves.

Published on 6 min read

TL;DR. WSearch is the service name of Windows Search, the service that builds the search index Windows uses for Start menu, File Explorer and Outlook searches. It runs C:\Windows\System32\SearchIndexer.exe, which spawns SearchProtocolHost.exe and SearchFilterHost.exe to read files, and it stores the index in C:\ProgramData\Microsoft\Search\Data\Applications\Windows\ (Windows.edb on Windows 10, Windows.db on Windows 11). Check it with sc query wsearch or Get-Service WSearch. Disabling or rebuilding it is reversible for the user and visible to an investigator: the start type lives in the SYSTEM hive and every change produces Service Control Manager events 7036 and 7040.

What WSearch is

Value
Service nameWSearch
Display nameWindows Search
BinaryC:\Windows\System32\SearchIndexer.exe /Embedding
Default start type (client Windows)Automatic (Delayed Start)
Registry keyHKLM\SYSTEM\CurrentControlSet\Services\WSearch
Index folderC:\ProgramData\Microsoft\Search\Data\Applications\Windows\

The service is the indexer, not the search box. Three processes do the work:

  • SearchIndexer.exe runs the service: it schedules crawls, owns the database and answers queries from the shell.
  • SearchProtocolHost.exe loads protocol handlers, the components that know how to enumerate a data store: the file system, Outlook mailboxes and other registered sources.
  • SearchFilterHost.exe loads filters (IFilters) and property handlers that extract text and metadata from each file. Running them in a separate, lower-privilege host keeps a crashing or malicious document parser away from the indexer itself.

The search box you type into is a different process: SearchHost.exe on Windows 11, SearchApp.exe on recent Windows 10 builds. It queries the index; stopping it doesn't stop indexing, and stopping WSearch doesn't remove the search box.

Where it stores the index

The service keeps its databases in C:\ProgramData\Microsoft\Search\Data\Applications\Windows\:

  • Windows 10 and earlier: Windows.edb, an ESE database, with its MSS*.log transaction logs and MSS.chk checkpoint.
  • Windows 11: Windows.db and Windows-gather.db, SQLite databases, each with a -wal file.

The location can be moved from Indexing Options (Advanced, Index location), which updates the Windows Search configuration in the SOFTWARE hive. The files are locked while the service runs. Collection methods, file by file, are in where Windows.edb and Windows.db are stored, and the format differences in Windows.edb vs Windows.db.

How to check, stop, restart or disable it

All of these need an elevated prompt except the queries.

Check the state and configuration:

sc query wsearch
sc qc wsearch

sc query gives the current state (RUNNING, STOPPED); sc qc gives the start type and binary path. In PowerShell:

Get-Service WSearch | Select-Object Name, DisplayName, Status, StartType
Get-CimInstance Win32_Service -Filter "Name='WSearch'" | Select-Object State, StartMode, PathName, ProcessId

Stop and restart (indexing pauses, nothing is deleted):

net stop wsearch
net start wsearch

or Restart-Service WSearch in PowerShell. Microsoft's own troubleshooting guide uses a restart to resume an indexer that was paused from Settings.

Disable, then restore the default:

sc config wsearch start=disabled
net stop wsearch

sc config wsearch start=delayed-auto
net start wsearch

The graphical route is services.msc → Windows Search → Startup type. In PowerShell, Set-Service WSearch -StartupType Disabled disables it.

Rebuilding the index, and what it destroys

A rebuild deletes the database and crawls every indexed location again. The supported way is Indexing Options → Advanced → Rebuild (on Windows 11: Settings → Privacy & security → Searching Windows → Advanced indexing options). Microsoft allows up to 24 hours for a large index to come back.

For a user, a rebuild fixes a corrupt or bloated index. For an investigator, it wipes the history the index held:

  • items for files deleted before the rebuild disappear;
  • every surviving item gets a new gather time close to the rebuild date;
  • the new database file has a recent creation time, much later than the OS install.

Compacting with esentutl /d is gentler (live records survive) but still destroys the free-page remnants a carver could have recovered.

What disabling or rebuilding means for forensics

The index is one of the few Windows artefacts that remembers files after they are gone (see evidence of deleted files in the index). A disabled service or a fresh rebuild changes what you can argue from it:

  • Service disabled: nothing is indexed from that point. The newest gather time in the database marks when indexing effectively stopped.
  • Index rebuilt: older history is gone; the compressed gather times make the rebuild date obvious.
  • Neither is proof of intent. "Optimise your PC" tools disable the service, and Microsoft documents rebuilds and compaction as repair steps.

How to tell maintenance from tampering, action by action, is covered in Windows Search index anti-forensics and its limits.

Event log and registry traces of the service

Registry (SYSTEM hive): HKLM\SYSTEM\CurrentControlSet\Services\WSearch

ValueMeaning
Start = 2Automatic (with DelayedAutostart = 1: Automatic (Delayed Start), the default)
Start = 3Manual
Start = 4Disabled

In an offline hive, resolve CurrentControlSet through HKLM\SYSTEM\Select\Current (usually ControlSet001). The key's last-write time gives an upper bound for the last configuration change. A registry parser reads both.

System event log, provider Service Control Manager:

Event IDWhat it recordsExample message
7036A service entered a new stateThe Windows Search service entered the stopped state.
7040A service's start type changedThe start type of the Windows Search service was changed from auto start to disabled.

A 7040 to disabled next to a 7036 stopped is the signature of someone turning the indexer off. A 7036 running entry after each boot is normal. Filter with PowerShell:

Get-WinEvent -FilterHashtable @{ LogName = 'System'; ProviderName = 'Service Control Manager'; Id = 7036, 7040 } |
  Where-Object Message -match 'Windows Search' |
  Select-Object TimeCreated, Id, Message

On a collected System.evtx, add Path = 'D:\case\System.evtx' in place of LogName, or open it in an EVTX parser. Execution traces of sc.exe, net.exe or services.msc (Prefetch, Amcache) can tie the change to a session.

FAQ

What is the Windows Search service name?

The service name is WSearch and the display name is Windows Search. It runs SearchIndexer.exe from C:\Windows\System32 and normally starts as Automatic (Delayed Start).

Is it safe to disable WSearch?

Windows keeps working: Start menu and File Explorer search fall back to slower, non-indexed searching, and Outlook's instant search degrades. It is reversible: set the start type back to Automatic (Delayed Start) and start the service. On a machine that may be investigated, disabling it stops the index from recording new activity.

Why does SearchIndexer.exe use so much CPU?

Usually because it is crawling: after a rebuild, a Windows upgrade, or when many files or a large Outlook mailbox change. The indexer slows down while you use the machine and catches up when it is idle. Persistent high CPU on an idle machine points to an index that is too large or a file it keeps failing on.

Related articles