Windows Search in File Contents Not Working

To have your Windows search in file contents (not only file names) can be a huge time-saver. I noticed that quite some people are having issues with both Windows 7 search and Windows 8 search. Just yesterday I was working in a computer forum and it struck me how many messages there were concerning the search function in Windows 7 and 8. If that’s not enough, several of the forum posters were wishing that Windows search would just work again the way it used to work in Windows XP.

Talk about evolution!

One would think that with the arrival of newer versions of the operating system, things would generally improve. So why did Microsoft decide to make Windows search worse?

Windows Search in File Contents Not Working – The Issues

First, let me talk about the problem(s) that people seem to be experiencing. It seems to be the case that Microsoft changed the default behavior of the search functionality so that it actually becomes less useful. On top of that, it also seems that in certain circumstances, the search functionality gets broken, so that searches for text strings inside files will not produce any search results, even if you know that there are files which do contain that text string.

I will show you how to fix both situations.

In order to explain it best, let me work with a few examples here. Let’s consider a Windows 7 computer for this first case. Suppose you have created a folder named “Workfolder” on your harddrive. I have illustrated this in the image below, where you see a newly created, empty workfolder on drive c:

Windows Search in File Contents - Step 01

In this empty folder, I will now create a new text document (a Notepad file, if you wish), named instruments.txt, containing the words “trumpet” and “piano”.

Windows Search in File Contents - Step 02

Windows Search in File Contents - Step 04

Windows Search in File Contents - Step 05

As you were able to follow along in the images above, I now have a text file named instruments.txt, saved in my workfolder.

Now, as soon as I start typing the letters “in” in the search box, the results will start showing up in my Explorer window, as you can see in the image below. This is of course what we would expect, since “in” is contained in the filename “instruments”.

Windows Search in File Contents - Step 06

Now, we know that inside the file is the word “trumpet”, but if I type trumpet in the search box, so search results come up. That's because Windows search in file contents doesn't work by default in Windows 7.

Windows Search in File Contents - Step 07

What’s up with that? I want to be able to use Windows search in file contents as well. That is one of the issues people are struggling with and here’s how to fix it.

The reason why Windows search in file contents is not working is that, by default, Windows 7 does not search inside files in “non-indexed” locations.

You might also have noticed in the images above the message that “searches might be slow in non-indexed locations”, so I will help Windows a little bit and click that message in order to add my workfolder to the indexed locations.

Windows Search in File Contents - Step 08

Adding the workfolder to the indexed locations to make Windows search in file contents ...

Windows Search in File Contents - Step 09

As soon as Windows has indexed my workfolder, search results will also start showing up when the contents of the file matches my search.

Windows Search in File Contents - Step 10

Alternatively, if you want the Windows search in file contents to function anywhere, you can also change Windows 7’s default behavior and let it search file contents in non-indexed locations as well. Be advised, however, that the searches in non-indexed locations can indeed take a while. (Indexing is the process of going through the folders and creating an index of what’s in there in order to produce faster search results).

To have Windows also look in file contents in non-indexed locations, press the ALT-key in your Explorer window. The menu bar will then come up.

Windows Search in File Contents - Step 11

Then select the “Tools” menu and click “Folder options”.

Windows Search in File Contents - Step 12

In the folder options window, click the “Search” tab and select the option to always search file names and contents. Then click ok. This makes Windows search in file contents, even in non-indexed locations.

Windows Search in File Contents - Step 13

Windows 8 Search in File Contents Not Working?

Quite a few people have reported issues with this search behavior and enough of the complaints must have made it to the Microsoft engineers, because in Windows 8 the default behavior is changed again. If you were to open up the search properties in Windows 8, you would see the default setting to always search in file contents.

Windows Search in File Contents - Step 14


Judging on the number of forum messages, people still seem to have a lot of problems with the Windows 8 search function. I have found that in some cases, the Windows 8 function gets broken. I’ve seen it happen on several Windows 8 computers and at first I thought it was caused by downloading and installing dubious software packages from the internet. One of the problematic computers was overloaded with all sorts of “utilities” and tools and “system tweakers” but, ironically, I have found that installing Microsoft Office can break the search function.

Diagnosing The Problem

If your Windows 8 search function shows no results for text string searches that you know are there, you should check your indexing settings. Here’s what to do.

In a Windows Explorer window, click inside the search box, then click “Advanced options”.

Windows Search in File Contents - Step 15

Then click “Change indexed locations”.

Windows Search in File Contents - Step 16

The Indexing options window will come up. Click the “Advanced” button.

Windows Search in File Contents - Step 17

In the Advanced options window, click the “File types” tab and scroll down to the txt extension to check the “Filter Description”. It should mention something like “Plain text filter”. If you see “Registered IFilter is not found”, then you have found the problem.

Windows Search in File Contents - Step 18

You can then close the Indexing options window, because you will need to change a setting in your Windows registry.

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall Windows. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

If you are ok with working in the registry, here’s how to proceed.

Go to the Windows 8 Start Screen and type “regedit” (without the quotes).

Windows Search in File Contents - Step 19

Then right-click regedit.exe and select “Run as administrator” to open up your Windows registry editor.

Windows Search in File Contents - Step 20

In the Windows User Account Control screen, click “Yes” to continue.

Windows Search in File Contents - Step 21

In the registry editor, navigate to Computer\HKEY_CLASSES_ROOT\.txt\PersistentHandler and inspect the “Default” value in the right-hand side of the screen.

Windows Search in File Contents - Step 22

If the value is not {5e941d80-bf96-11cd-b579-08002b30bfeb}, doubleclick the entry to bring up the “edit string” window and change it to this value. Then click ok.

Windows Search in File Contents - Step 23

That should fix your file searches for content in text files. If you notice that your Windows search in file contents does not work with pdf files as well, you can repeat the same steps from above in the advanced indexing options, but then you need to scroll down to the pdf file type to check whether the “Registered IFilter is not found” setting is there.

If you find this also for your pdf files, go in your registry editor and navigate to the value


Make sure that the value is


If there’s another value, change it to the abovementioned value and close the registry editor. Pdf searches should now also work.

Please note: in some cases it requires a reboot for the changes to work. Also, searches in the contents of pdf files can only work if the pdf files are actually searchable. The type of pdf files that are stored as an image, cannot be searched. To check whether or not your pdf file is searchable, open up the pdf file and try selecting a piece of the text with your mouse, as illustrated in this image:

Windows Search in File Contents - Step 24

If you can’t select any text, your pdf file is not searchable.

If you found this article helpful, please take a moment and leave a short comment below. I’d appreciate it, thank you! Also, if you want to be informed about new articles and updates before anyone else, feel free to sign up for my free newsletter.

New! Comments

Have your say about what you just read! Leave me a comment in the box below.