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

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\USearch\Gather\Windows\SystemIndex\StartPages\3]

"URL"="C:\\Users\\"

"HostDepth"=dword:00000000

"EnumerationDepth"=dword:ffffffff

"FollowDirectories"=dword:00000001

"StartPageIdentifier"=dword:00000005

"CrawlNumberInProgress"=dword:ffffffff

"CrawlNumberScheduled"=dword:ffffffff

"ForceFullCrawl"=dword:00000000

"ForceFullCrawlExternal"=dword:00000000

"LastCrawlStopped"=dword:00000000

"Type"=dword:00000000

"CrawlControl"=dword:00000000

"LastCrawlType"=dword:00000003

"IncludeInProjectCrawls"=dword:00000001

"LastCrawlTime"=hex:20,4b,40,57,05,97,c5,01

"LastStartCrawlTime"=hex:00,38,38,3e,05,97,c5,01

"NotificationHRes"=dword:00000000

"LastCrawlSuccesses"=dword:000002a9

"LastCrawlExcluded"=dword:0000000a

"LastCrawlAccessDenied"=dword:00000000

"LastCrawlNotFound"=dword:00000000

"LastCrawlUncategorizedErrors"=dword:00000004

"LastCrawlSeedStatus"=dword:00000000

"LastCrawlId"=dword:00000009

"NumberOfUrls"=dword:00000000

"CsType"=dword:00000004

"Created"=dword:00000000

"Modified"=dword:00000000

 

 

 

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.

 

<include path=”yourpathhere”/>

 

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

 

<scope>

<include knownFolder=”{…}”/>

<include knownFolder=”{…}”/>

<include path=”C:\Pictures\”/>

</scope>

 

 

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.