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.
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:
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:
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:
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
I think you could be correct when you say that there's a corrupted file that causes it to hang. A crude way of trying to identify the file is to go the files tab and turn off half the files types from being indexed. Let it run. Either it completes or it stops. If it stops, turn off half again. If it completes, you know the bad file type is in the other half. Doing this should allow you to identify the bad file type.
Also, look through the file list that's indexed. File types have different search providers, like HTML, plain text and so on. Are there any that look out of place, that might have been installed by some third party application?
Another idea is let the search hang on the 4,317th file. Then run a command prompt. Type
CD c:\
DIR /s /TA /O-D >c:\newt.txt
This will create a file named newt.txt that will hold all of the files and the last time they were accessed. Accessed, meaning read, not modified. You'll have to search through the file with a file editor but look for the last several files that were modified. If we're in luck, your bad file will be in there. Good luck!
Best Answer
To disable the search indexing service, follow subsequent steps
To disable search, follow the instructions mentioned below
Instructions from http://www.howtogeek.com/howto/10246/how-to-disable-search-in-windows-7/