Help create BAT file for search index


Pignatious

Member
Local time
2:49 PM
Posts
10
OS
Windows 11 Pro
Hi,
I'm new to using BAT files and was wondering if you could show me how to edit the above BAT file to:
1) to use either the 'Classic' or 'Enhanced' option
2) to add/remove folders from the 'Enhanced' search option
and, most importantly
3) disable 'indexer backoff' (Am I right in thinking that this will prioritise indexing speed over other running processes?)
Thank you, in advance, for any help or guidance you can offer me.
Kind regards,
Pignatious
 

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Dell Inspiron 7570
    CPU
    Intel Core i5-8250U @ 1.6 GHz, 1800 MHz, 4 cores
    Motherboard
    Dell
    Memory
    16.0 GB
    Graphics Card(s)
    Intel UHD Graphics 620 - Render only (NVIDIA GeForce 940MX)
    Sound Card
    Realtek
    Antivirus
    Malwarebytes Premium 4.6.9
Hi Neemobeer,

the BAT file in question (below) was posted by Shawn Brink in his post "Reset and Rebuild Search Index"
 

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Dell Inspiron 7570
    CPU
    Intel Core i5-8250U @ 1.6 GHz, 1800 MHz, 4 cores
    Motherboard
    Dell
    Memory
    16.0 GB
    Graphics Card(s)
    Intel UHD Graphics 620 - Render only (NVIDIA GeForce 940MX)
    Sound Card
    Realtek
    Antivirus
    Malwarebytes Premium 4.6.9
You could use procmon to determine what to add. Just filtering on PATH contains "Windows Search" and Operation is "RegSetValue" causes over 700 registry changes just toggling between classic and enhanced
 

My Computer

System One

  • OS
    Windows 11
Batch:
:: Use Classic Mode for Search Indexer
reg add "HKLM\SOFTWARE\Microsoft\Windows Search" /v EnableFindMyFiles /t REG_DWORD /d 0 /f
net stop "Windows Search"
net start "Windows Search"

:: Use Enhanced Mode for Search Indexer
reg add "HKLM\SOFTWARE\Microsoft\Windows Search" /v EnableFindMyFiles /t REG_DWORD /d 1 /f
net stop "Windows Search"
net start "Windows Search"

I could be wrong, but I guess that adding/removing exclusions in the Enhanced Mode has the same effect as adding/removing exclusions in the Classic Mode.

Batch:
:: Disable Indexer Backoff
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v DisableBackoff /t REG_DWORD /d 1 /f
 

My Computers

System One System Two

  • OS
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Asus TUF Gaming F16 (2024)
    CPU
    i7 13650HX
    Memory
    16GB DDR5
    Graphics Card(s)
    GeForce RTX 4060 Mobile
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    512GB SSD internal
    37TB external
    PSU
    Li-ion
    Cooling
    2× Arc Flow Fans, 4× exhaust vents, 5× heatpipes
    Keyboard
    Logitech K800
    Mouse
    Logitech G402
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
  • Operating System
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Medion S15450
    CPU
    i5 1135G7
    Memory
    16GB DDR4
    Graphics card(s)
    Intel Iris Xe
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    2TB SSD internal
    37TB external
    PSU
    Li-ion
    Mouse
    Logitech G402
    Keyboard
    Logitech K800
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
disable 'indexer backoff' (Am I right in thinking that this will prioritise indexing speed over other running processes?)

Almost.
It prevents indexing being paused while you are using the computer.
It's not perfect. I've seen indexing paused even with Indexer backoff disabled.


Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3447

Latest Support Threads

Back
Top Bottom