Windows

Choose your Windows XP search interface with the XP Search Toggle utility

When your users don't need all the bells and whistles of XP's Search Companion, they can edit the registry to switch to the Basic Search version, or they can use Greg Shultz's Search Toggle utility to do it for them. This Drill Down explains how.

Windows XP’s Search Companion has many new features that can make searching easy, but there are times when all the bells and whistles simply get in the way. Windows XP’s advanced search features can even hinder system performance on some workstations. Wouldn’t it be nice to be able to revert back to the Basic Search interface found in Windows 2000 when you need it?

I’ve discovered that the old Basic Search interface is still available in Windows XP, and you can activate it by making a change in the registry. However, to switch back to the Search Companion you’d have to make another change to the registry. Editing the registry every time you want to switch between the Basic Search interface and the Search Companion would be a real hassle. So, to make it easy to switch between the two, I used Windows Script Host, VBScript, and HTA technology to develop an XP Search Toggle utility you can download. In this Daily Drill Down, I'll introduce you to my XP Search Toggle utility and explain how it works.

Registry edits behind the scenes
As I mentioned, switching between the Search Companion and the Basic Search tool involves making a slight change in the registry. In this case, the first thing that the script has to do is add a new key, Use Search Asst, to the registry. This new key added is:
  • HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState key

  • Once the Use Search Asst key has been added to the registry, you can turn off the Search Companion by setting the value of this key to no, or turn it on by setting the value to yes.

    Fortunately, the Windows Script Host provides several programming methods that let you quickly and easily automate the process of editing the registry. In this case, the script that is the heart of the XP Search Toggler utility uses the RegWrite method to change the value of the Use Search Asst key in the registry.

    In addition, the script lets you launch your Search tool of choice upon exiting the program. Unfortunately, I wasn’t able to find a way to access the Search tool on a shell level from within an HTML Application, so I had to use the SendKeys method to access Search tool via the Start menu. I use SendKeys to press [Ctrl][ESC], which opens the Start menu, and [ESC] to immediately close the Start menu. Since the focus is on the Start button, I then use SendKeys to press [F3], which launches the Search tool.

    I’ve packaged the script as an HTML application, which allows me to combine the scripting with a fancy user interface I created with simple HTML code.

    SendKeys
    For more information on the SendKeys method, see my article “Automate tasks with Windows Script Host's SendKeys method.”

    Installing the Search Toggle utility
    To install the Search Toggle utility, simply download the XP Search Toggle installation package and double-click the XP Search Toggle Installation.exe file. The installation program will prompt you to choose a folder in which to install the application. If the folder doesn’t exist, then installation program will create it for you.

    After you install the Net Sender, you’ll see the following four files in your folder:
    • SearchToggler.hta
    • SearchToggler.ico
    • no.gif
    • yes.gif

    Of course the SearchToggler.hta file is the HTA file that you’ll use to launch the application. The SearchToggler.ico file contains the icon that the HTA uses for the control menu and the taskbar. The no.gif and yes.gif files contain the graphic images of Rover, the Search Companion’s animated character, which provides a visual representation of the operations performed by the Search utility Toggler.

    Using the XP Search Toggle utility
    Using the XP Search Toggle utility is quite easy—simply double-click the HTA file to launch it. If you prefer, you can create a shortcut to the HTA file and place it on your Start menu. Once you launch the XP Search Toggle utility, you’ll see the main screen, as shown in Figure A.

    Figure A
    The XP Search Toggle utility switches between the Search Companion and the hidden Basic Search tool.


    All you have to do is select one of the option buttons, depending on which search tool you want to use. Then, if you want to launch that search tool immediately, select the Launch Search check box and click OK.

    When you do, the script will edit the registry and then launch the search tool you’ve selected. Keep in mind that the script uses the Start menu to launch the search tool, so the Start menu will pop up momentarily before the search tool appears.

    If you happen to click OK before you select one of the option buttons, you’ll see the error message shown in Figure B. However, the XP Search Toggler window will remain on the screen so that you can close the error message and start over.

    Figure B
    If you fail to select a search option before you click OK, you’ll see this error message.


    If at any time you want to abort the operation, just click the Cancel button. When you do, the XP Search Toggle window will close without making any changes to the registry.

    More on the Search Companion
    If you want to learn more about the additional features available in Windows XP’s Search Companion, check out this article on the Microsoft Windows XP Expert Zone Web site. It covers everything from performing complex searches to getting rid of that annoying animated character that just takes up space.

    About

    Greg Shultz is a freelance Technical Writer. Previously, he has worked as Documentation Specialist in the software industry, a Technical Support Specialist in educational industry, and a Technical Journalist in the computer publishing industry.

    0 comments

    Editor's Picks