Windows Search

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search

Silent installer for Windows Search 4.0.

WPKG Package

<!-- http://support.microsoft.com/kb/940157 -->
<package id="winsearch" name="Windows Search 4.0" revision="1" reboot="false" priority="10">
  <check type="uninstall" condition="exists" path="Windows Search 4.0" />
  <install cmd='"%SOFTWARE%\microsoft\WindowsSearch-KB940157-XP-x86-enu.exe" /quiet /norestart' />
  <upgrade cmd='"%SOFTWARE%\microsoft\WindowsSearch-KB940157-XP-x86-enu.exe" /quiet /norestart' />
  <remove cmd='"%WINDIR%\$NtUninstallKB940157$\spuninst\spuninst.exe" /quiet /norestart' />
</package>

<!-- Windows Search slows WPKG processing significantly if set to Automatic start.  We can set it to manual
  using the package below.  To disable Windows Search service altogether, use "4" instead of "3". -->
<package id="winsearch_Manual" name="Set Windows Search startup to Manual" revision="1" reboot="false" priority="9">
  <check type="registry" condition="equals" path="HKLM\SYSTEM\CurrentControlSet\Services\WSearch\Start" value="3" />
  <depends package-id="winsearch" />
  <install cmd='reg add "HKLM\SYSTEM\CurrentControlSet\Services\WSearch" /v Start /t REG_DWORD /d 3 /f' >
    <exit code="0" reboot="delayed" />
  </install>
  <!-- The following line Should make the standard Windows search companion the default, although there is also a per-user setting under HKCU... -->
  <install cmd='reg add "HKLM\SOFTWARE\Microsoft\Windows Desktop Search\DS" /v ShowStartSearchBand /t REG_DWORD /d 0 /f' />
  <upgrade cmd='reg add "HKLM\SYSTEM\CurrentControlSet\Services\WSearch" /v Start /t REG_DWORD /d 3 /f' >
        <exit code="0" reboot="delayed" />
  </upgrade>
  <remove cmd='reg add "HKLM\SYSTEM\CurrentControlSet\Services\WSearch" /v Start /t REG_DWORD /d 2 /f' />
</package>