pilif.ch - a cuwps

[home]
stuff
some worldwide unique stuff
  • Daily Strips
  • PersistentHandler
  • Denis' Birthday
  • DVD-Region (1)
  • DVD-Region (2)
  • Defeating Miguel
  • Neuronal Interface ;-)
  • Swiss ADSL Check
  • Autodestructing Email
  • Fun with bounces
  • backstage
    backstage-reports of some of my paid projects
  • bookexchange.ch
  • info
    valuable information for my visitors
  • RasInTask
  •  
    introduction
    The full-text search engine of Windows XP or possible 2000 already does not blindly open every file when looking for text in it. Since under Windows binary formats are quite common, Microsoft intrduced a concept named PersistentHandlers which are small shell extensions that know about a particular file-format and thus can provide better results to a full-text-search than what just looking at the unprepared file may yield.

    Unfortunatly this is a problem for us UNIX-guys and coders: The fulltext mode of the windows file-search utility does not work on file types where no PersistentHandler is defined for, regardless whether it just contains plain text or not. Microsoft already pre-registered some common types to use the default plaintext-handler, but many others are not registered (PHP for an example, which prevents the fulltext search from working with my PHP-scripts; of course without any error-message indicating the problem)

    I have written a small GUI-Tool (using Delphi), which allows one to set the already present plaintext PersistentHandler for every registered filetype, practically allowing fulltext search on very filetype you can imagine.

    how does it work
    After starting the application (an installation process is not necessary), you will be presented a screen like the one below

    Screenshot

    • Unchecked boxes are filetypes registered on the system where no PersistentHandler is registered. ".php" would be an example where this is completly wrong.
    • Checked boxes are filetypes which use the plaintext handler and thus can be searched by the fulltext engine.
    • Greyed boxes are filetypes that already have a PersistentHandler registered, but whose handler is not the default one for Text-Files. Word-Documents are an example for this.
    When checking or unchecking a box, the program will create or remove a Registry-Key named PersistentHandler with a default value of {5e941d80-bf96-11cd-b579-08002b30bfeb} (the GUID of the textfile-handler) under HKEY_CLASSES_ROOT\-<extension>

    credits
    I created this tool in about 20 Minutes after having read an article in the german magazine c't which dealt with the search-applet in Windows XP. Thanks for the inspiration, c't.

    This program is dedicated to my love, Evelyn.

    bugs
    There are no known user-visible bugs, but the implementation could minimize reading about 50%, but this would lead to much more complex code which itself would lead to much more debugging. This may be a scalability-problem on slow machines with a lot of registered filetypes. Maybe I change this sometime.

    license
    I release the tool and its sourcecode under the classical BSD-Style-License:

    Copyright (c) 2002, Philip Hofstetter
    All rights reserved.

    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

    • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    • Neither the name Philip Hofstetter nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    download
    pershchg.exe (Application, 396 KBytes)
    pershchg.zip (Delphi Sourcecode, 6 KBytes)


    © 2003 by pilif. cuwps stands for completely useless webpage and is a non-registered non-trademark by pilif - Last Modification: 10/14/02 at 02:02:21