Mink Machine

Unleash searching in Windows XP

Every operating system worth the name has a built-in feature which enables the user to search for files in the file system. Good old Windows 2000 had a search function that worked in a predictable way, so the one in XP should work at least as good as the W2K one, right? Wrong.

The dirty facts

The search function in XP is officially claimed to be better than the ones in earlier versions of Windows, but is in fact flawed by design.

The search function in XP is officially claimed to be better than the ones in earlier versions of Windows, but is in fact flawed by design.

Yes, it is faster, but only because it doesn’t look for the files you want. The reason for this is that the creative minds of Microsoft has created filters that assist in extracting correct content from the files, which in theory could result in more accurate search results. The filter components are part of the indexing service, a base service in XP. They implement the IFilter interface, which is nice and cosy, but unnecessary knowledge for the problem at hand. The relevant components for this text are:

  • nlhtml.dll: filters HTML 3.0 or earlier
  • offfilt.dll: filters Office extensions
  • query.dll: filters plain text and binary files
  • mimefilt.dll: Filters MIME

Dude, where’s my file?

These filters are only available for file types called "common document types", i.e. the only file types that Microsoft believes that Windows users will ever need. Despite recent patches and updates that address that issue, this act of genius removes the possibility to search for files with other extensions, such as asp (Microsoft’s own technology), log, js, xml, css… In addition to that, even the file types with a registered filter could be mishandled. For instance, the HTML filter ignores any text that is contained in comments in an HTML file, since that text is not displayed in the browser! A perfect example of a situation where the process of thought has jumped out of the window (sorry) to a certain doom. Sometimes I wonder how the architects got away with this, explaining it to the board of managers:

"Unfortunately the search function is no longer performing searches, but we have added an animated yellow dog and a lot of clickable meaningless options, thus confusing the user and makes him believe that he is operating a powerful search engine. If anything goes wrong, the user will blame the yellow dog for not finding the files instead of calling us.", was heard from the clean-shaven blue collar helming the Powerpoint presentation.
"Excellent work, son!", the board members cried out in unison.

Your mission, if you choose to accept it

However, not all is black as Agent Cooper’s coffee. For every problem there is a solution. Step one is to install the updates for XP, adding a few filters to the very small list of supported file types. Step two is to edit the Registry by hand using Regedit. There are two ways to solve the problem:

  • Register a filter for every file type that you want to search. This could be very tedious for a large number of file types, but here is how you do it. Locate the file extension in HKEY_CLASSES_ROOT, add a PersistentHandler key and set the value to {5e941d80-bf96-11cd-b579-08002b30bfeb}.
    Example for file type .abc: HKEY_CLASSES_ROOT\.abc\PersistentHandler\(Default) = {5e941d80-bf96-11cd-b579-08002b30bfeb}
    This will install a plain text filter for the specified file type. This method will solve the problem with HTML comments mentioned earlier (use plain text filter instead of the HTML filter for HTML files).
  • Configure XP to actually search all files no matter what the file type. This operation requires administrative privileges. Locate the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet
    \Control\ContentIndex
    and set FilterFilesWithUnknownExtensions to 1.

If you are just looking for a way to include your binary files in a search, try this in a command prompt:

findstr /L /I /S /M C:\your_foldername *

Alternatives to battle

If the solutions above doesn’t appeal to you, there are alternatives to battle, as wise old Obi-Wan once put it. Instead of fixing the XP search, just go ahead and install a new one. The two obvious contenders today are Google Desktop Search and MSN Toolbar Suite (the latter by Microsoft, so I suppose not even the guys at Redmond find their files anymore by using the yellow dog).

Google Desktop Search

The installation file is a tenth in size compared to MSN Toolbar Suite. Unfortunately GDS is incompatible with a lot of popular antivirus software such as NOD32, which may force a sudden halt in your searching plans.

Google desktop search bar

This thing is added to your valuable space in the system tray. Simply enter search queries and you shall find. Google build and maintain a desktop index for more effective search. Note that it will store web search results and look for cached web sites on your local computer.

MSN Toolbar Suite

The Microsoft feeling sets in already at the installation, as the file size is ten times the size of Google Desktop Search. Nothing unexpected so far. And then it get even worse. The search utility is bundled with a lot of other stuff. The Toolbar Suite contains not one but three different toolbars for searching:

  1. MSN toolbar
    MSN Toolbar for IE and Explorer. This critter adds yet another toolbar to IE, crammed with features closely tied to Microsoft products. The same toolbar is also added to the Explorer in its full form, thus cluttering the Explorer with functions irrelevant to desktop browsing such as form fill and popup blocker.
  2. MSN desktop search bar
    MSN Deskbar. A search field is placed in the tray, where search queries can be entered. The Deskbar build and maintain a desktop index, draining system resources in the process. However, it does not index all type file types, only about 200 of them.
  3. MSN Toolbar for Outlook. Installing a search toolbar in Outlook. But really, you shouldn’t run Outlook.

Final words

The main problem with both tools as I see it is the fact that both are external programs. Sure, both are working better than the built-in search from the box (hey, even my pet mink could search better than that), but you still have to start a program to search instead of just right-clicking the working folder. I suspect there will be a right-click alternative implemented very soon for the competing software. If not, it’s not too hard to write it yourself.

Comments

No comments yet.

Write a comment

Your email address will not be published. Required fields are marked *

Reine

About

Reine is a web developer who enjoys caffeine-fueled urban traveling. More...

RSS @reinel Instagram