How to: Customize Indexing and Search locations with the Windows Search Engine
As you all probably know, Windows Vista introduces a new Windows Search Engine, which promises to index your files across all your drivers, folders, and computers on your network and aggregate your data into Virtual Folders and rich metadata based searches. There’s just one problem with this in beta 1: it doesn’t do that. Instead, WSE will only index files in %systemdrive%\Users\ by default. Fear not! AlphaAlien, stan_fisher, and (to a lesser extent) myself have looked into this annoyance for the past few days and have come up with a work around for beta 1 that will allow you to index any folder you want, and this guide will show you how.
First of all, however, I must present this standard disclaimer: We, the creators of this guide, take no responsibility for any damage the follow procedure may cause to your data and hardware. You understand that by modifying beta software (which itself may destroy your system) you are taking a risk and must bear any consequences yourself.
With that out of the way, lets begin!
There are two parts to this problem: First, the indexer doesn’t index outside of \Users\, and second, Search doesn’t search outside of \Users\. Fixing one of these problems without fixing the other renders all your work useless, so don’t skip a section.
We’ll start with fixing the indexer, since it doesn’t make sense to fix the Search if we don’t have anything to index.
Fix the Index!
Drop the following text into notepad, alter it as necessary, and save it as indexfix.reg
Windows Registry Editor Version 5.00
I’ve bolded the three lines that you will need to change, as they are system specific.
Save the changes you’ve made and merge the file with your registry. Note that you will need to alter and merge this file for every folder or drive you want to index!
Now go to the Run dialog and type “services.msc.” Restart the Windows Search Engine service. Then click the Windows Search Engine icon in your notification area and click “Rebuild Index” in the window that pops up.
Indexing will take a little while, so I suggest grabbing a snack while waiting for most of the indexing process to complete.
Fix the Virtual Folders!
There’s three virtual folders per user profile you will want to alter for them to show all your media: All Documents, All Music, and All Pictures and Videos. To find these virtual folders, navigate to %userprofile%\Virtual Folders. Open a new instance of notepad, and drag one of the three virtual folders I mentioned above into it.
In Notepad, you will see a section of XML called <scope>, with various entries starting with <include knownFolder= under it. Before </scope>, but after <scope>, add the following line (or lines) for each drive or folder’s content you want to have show up in that virtual folder.
Where yourpathhere points to a folder or drive that is indexed by WSE. Save the virtual folder. Repeat this process for the other two virtual folders.
For example, lets say I want to edit All Pictures to point to C:\Pictures. I edit All Pictures and Videos.vfolder to look like the following
Now you can open one of the libraries in your Start Menu (documents, Music, or Pictures) and if you did everything right (including waiting for WSE to index your files!) you should see all your media and documents now J
Custom-location indexed search
As of right now, this requires you to use third party handle-viewing programs to manually enable the combobox where you can select where to search. If you don’t know what those kinds of programs are, or how to use them, avoid doing an indexed search with custom locations. If you must search a folder outside of \Users\, right click and choose Search… to do a non-indexed (and painfully long) search. Stan is working on a program that will automatically enable the where to search combobox, and we’ll let you know when it’s ready.