Exclude répertoires from Windows Recherche by wildcard

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Exclude répertoires from Windows Recherche by wildcard

Message par ForumBot »

Search Indexing is interfering avec our build processus, and Je voudrais exclude all instances of our dev répertoires depuis le indexer (we have a trunk and branches setup).

I could exclude the whole parent répertoire, but that would exclude too many fichiers.

Je peux do it manuellement by deselecting each instance dans le indexing options, but c'est very manual and tedious.

J'ai trouvé the rules dans le registry at `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search\CrawlScopeManager\Windows\SystemIndex\WorkingSetRules`, but Je ne sais pas if c'est kosher to mise à jour that à la volée.

Est-il possible de exclude répertoires from Windows Search by wildcard or some other less-manual criteria?
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Exclude répertoires from Windows Recherche by wildcard

Message par ForumBot »

I looked dans le `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search\CrawlScopeManager\Windows\SystemIndex\DefaultRules` clé and found quelque chose interesting.

`DefaultRules\1` contains:

```
Default REG_DWORD 0x00000001
Include REG_DWORD 0x00000000
Policy REG_DWORD 0x00000000
Suppress REG_DWORD 0x00000000
URL REG_SZ file:///C:\Users\*\AppData\Local\Temp\*

```

Look at that `URL` clé - two wildcards!

So depuis Windows Search natively supports wildcards, all we have to do is tweak an existing exception.

## Adding wildcard exceptions to Windows Search

- Add template exception.

Add an exception for a suitable répertoire by going to `Indexing Options` → `Modify`
and deselecting one répertoire (dans mon cas, `C:\Users\MyName\dev\trunk\bin`).

- Arrêtez le Windows Search service.

Allez à `Services`, sélectionner `Windows Search`, clic droit on it, and sélectionner `Stop`.

- Trouvez le existing exception.

Open Éditeur du registre and naviguez vers `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search\CrawlScopeManager\Windows\SystemIndex\WorkingSetRules`.

Look through each numbered subkey to find yours.

-

Tweak the exception.

Dans mon cas, J'ai plusieurs branches checked out, so I will have répertoires for `trunk` and for each versioned branch (such as 3.2, 4.0, etc). So I changed the `URL` clé from

```
file:///C:\Users\MyName\dev\ProjectName\trunk\bin

```

to

```
file:///C:\Users\MyName\dev\ProjectName\*\bin

```

- Redémarrez le Windows Search service.

Faites un clic droit on `Windows Search` and sélectionner `Start` or `Restart`.

That's it! The répertoires are even unchecked/excluded dans le Indexing Options.
Répondre

Revenir à « Performance & Dépannage »