Searching for file content on your computer or server is a common task and one where you would expect accurate results. You, like so many of us, may have assumed that but found different results.
Within Windows 2000 Server, if you entered something in the windows search dialog and clicked "Find", it would find it. But, with Windows Server 2003 or Windows XP, there are a lot of searches that would come up empty, even if you were sure that you had files with the words in them that you were searching for.
The reason that the results are different in Windows Server 2003 and Windows XP is because Microsoft decided to only include certain types of files in the search to speed up the search. Even if you set the file type as "All Files and Folders", it ignores a large amount of files when doing a search. The reasoning is that it takes a long time to search every file on the server and binary type files like a jpg or gif or exe don't need to be searched for a plain text search term. Why include them if they aren’t going to turn up any results anyway.
While I agree with it in part, if I want to find a file based on a keyword, I want it to search every file so that I can be sure that my search is accurate.
The fix is fairly easy as long as you don't mind making a registry change. My preferred method is to set Windows to index every file, even if it's an unknown exception. This is done by adding or changing a DWORD called FilterFilesWithUnknownExtensions in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ContentIndex. Set it to 1. (1 for on, 0 for off)
In fact I added it as part of the build process here at ORCS Web when Windows Server 2003 first came out a few years ago. The search on every server on our network will search every file type.
Here is how I prefer to do it. Create a file called AddIndexingToAllFiles.reg (Or, I just call it abc.reg since I delete the file immediately after using it). Then put the following in it:
Windows Registry Editor Version 5.00
Save the file on your desktop and double click on it. After accepting the prompt and warning, the entry will be added to your registry. You can delete the registry file since you're done applying it.
Here's a good Microsoft KB article on this with further details: http://support.microsoft.com/default.aspx?scid=KB;EN-US;309173. It also explains how you can add specific extensions rather than just indexing all files if you prefer to do that.
Note: This is for Windows XP and Windows Server 2003. The rules change again in Vista with a whole new search engine and method. Here is a long discussion between Microsoft and some not-so-happy people discussing how Vista works: http://windowsvistablog.com/blogs/windowsvista/pages/advanced-search-techniques.aspx.