Windows – Correct way to disable indexing in Windows 7

windows 7windows-search

What's the best way to disable indexing in Windows 7?

All of the articles that I've found online instruct me to access services.msc and disable the Windows Search service. However, even after I did that, when I right click properties of my C-drive, I notice the "Allow files on this drive…indexed…" is still checked.

So should I uncheck that option and re-enable Windows Search? Or just uncheck it and leave the Windows Search service disabled?

Best Answer

If your objective is to retain search functionality, but not to use indexes, you need to set up the following situation:

  • Turn off the indexing (to prevent an index being produced).
  • Delete the existing index (to prevent windows from using the index during searches).
  • Avoid re-enabling indexing.
  • Optional: enable the searching of file contents.

Turning off indexing

Start -> Run -> services.msc -> disable and stop Windows Search.

Ensure that the Startup type is set to disabled to prevent Windows from starting it again automatically.

Windows search service dialog box

Deleting the existing index

You can get the path to the search index from the following dialog box:

Control Panel -> Indexing Options -> Advanced

However since we have disabled indexing, it will be empty:

Empty Windows Search Properties dialog

But we can still look up the value in the registry:

  • Start -> Run -> regedit.exe
  • Browse to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search
  • We need the value of the DataDirectory key:

Windows Search Registry Configuration

Delete the Search folder specified by that path.

Avoid re-enabling indexing

Beware that when you run a search, you will frequently see this popup:

Propt to turn on search indexing

If you enable this, the indexing service will be restarted, and Windows will start using the index for indexed locations. So don't do that if you don't want it to use the index.

Search file contents

You may want to turn on searching file contents:

Control Panel -> Folder Options -> Search Tab

Search file contents configuration