Here's an Excellent Article re Features of the Search Box of Classic Shell

Discussion in 'Interesting/Unrelated' started by bphlpt, Nov 7, 2013.

  1. bphlpt

    bphlpt A lowly staff member Staff Member

    GauravK, aka xpclient, who does "the testing, some new feature ideas and UX/usability feedback for Classic Shell", wrote a very excellent tutorial about using the powerful Features of the Search Box of Classic Shell. I thought it was so good I'll reproduce it here in it's entirety.

    =====================================

    When you first install Classic Shell 4, and pick either the 'Classic with two columns style' or the Windows 7 style, then by default, the search box is focused and you can just start typing immediately to find and launch anything exactly like the Windows 7/Vista Start Menu.

    By default, in the single column 'Classic style', the search box isn't focused so you can use keyboard accelerators. You need to press Tab to focus on the search box although this can be changed from the "Search box" tab in Start Menu settings. When the setting "Access normally" is selected and the "Selected by default" option is checked, the search box will be focused when you press the Win key.

    Classic Shell 4.0 search box is incredibly powerful now that it has Windows Search integration. Here's a comprehensive guide of its functionality.

    What Classic Shell's search box lets you find:

    The search box lets you search

    1. Program shortcuts: The search finds program shortcuts (*.lnk files) from Start Menu folders (there are 2 of them - one at %appdata%\Microsoft\Windows\Start Menu and the other at %programdata%\Microsoft\Windows\Start Menu). Additionally, on Windows 8, Modern app shortcuts are also searched which are stored at %localappdata%\Microsoft\Windows\Application Shortcuts. Even if Windows Search indexing is turned off, programs will be searched.

    If you want your own shortcuts (links) to be searched, copy-paste them inside the Start Menu or Programs folders. The search box tracks how many times which program was launched so frequently launched shortcuts rise to the top of the results.

    2. Program executables: The search box is uniquely capable of searching executable programs (*.EXE, *.MSC) from folders included in system PATH environment variable. By default, the folders included in your system path which contain many useful EXEs are C:\Windows and C:\Windows\system32. To add any folder you want to the system PATH, open SystemPropertiesAdvanced.exe -> Environment Variables. Under System variables, edit the value of 'Path', add a \; after the last path and add your folder there. For example, if 'Variable value' is already:

    ...%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

    then modify it to be

    ...%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Your Folder\

    This will add the folder to the system path. Note that this also does not depending on Windows Search indexing.

    You can also run programs defined in "App Paths" key in the registry at: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths

    3. Settings: The search box can search the Control Panel settings virtual folders (there are also 2 of them - one which has a list of all the Control Panel applets and the other which has long textual descriptions of all settings/Tasks (shell:::{ED7BA470-8E54-465E-825C-99712043E01C}). This is the so called "GodMode" folder which also has a long list of keywords which also Classic Shell's Start Menu searches resulting in a very comprehensive ability to find any setting on your computer.

    The settings are also searched even if Windows Search indexing is completely turned off.

    4. Indexed Files: The search box shows results from the Windows Search index. This includes any file extension that Windows Search is capable of indexing and any folder which is included in the "Indexing Options" Control Panel. This is only available in Classic Shell 4.0 and later. Classic Start Menu's file search depends entirely on Windows indexing. If you stop the search service, programs and settings will continue to work but file search will not.

    To change which folders are indexed, open Indexing Options -> click Modify and add or remove locations. To change which file extensions are indexed and the metadata/properties for which file extensions are indexed, click the Advanced button. To turn off indexing the contents of a specific file in some folder, open its Properties, on the General tab, click Advanced and uncheck the option "Allow this file to have contents indexed in addition to file properties". This checkbox toggles the 'index' attribute for a file, so you can opt out of indexing the contents of a specific file.

    Also, all local folders and files included in Windows Libraries are also indexed and searched. File search can search your emails (Windows Mail, Live Mail, Microsoft Outlook and the Windows 8 Mail app) as long as the folders where emails are stored are indexed by Windows Search or the protocol handler is installed (in case of Outlook).

    Windows Search is capable of indexing not just the file name but also the metadata of files (in case of pictures, videos, documents etc) and their contents (when the documents are not plain-text but in some binary format). For that you need to install iFilters. Some programs like Microsoft Office automatically install iFilters to index the file types they handle. To index the contents and metadata of other formats such as ZIP, RAR, CHM, HLP, CAB, PDF, JPG, WMA, WMV and other formats which store metadata in XMP format, you need to install additional free iFilters. Think of iFilters as search plugins which can extend the ability of your system to index and search these file types.

    Windows Search also supports protocol handlers so for applications which use their own database formats such as Microsoft Office Outlook, Mozilla Thunderbird, Internet Explorer History, Lotus Notes etc, you need to install them too. Some protocol handlers are already pre-installed with Windows such as the ones for Sticky Notes, Offline Files and RSS feeds platform. Others such as Outlook are installed with Office.

    You can download free iFilters and protocol handlers from many sites such as iFilter.org, http://www.ifiltershop.com/ and http://www.citeknet.com/.

    The more iFilters you have installed, the more powerful Classic Shell's Search box gets.

    Additional powerful features of Classic Start Menu's search feature:

    - See results in place: You can press Enter on each category header of search results to expand it and see more results. Press Enter again to un-expand that category. Click on the category name (e.g. Documents, Music) or press Ctrl+Enter to show all results in File Explorer.

    - Auto-complete: You can type paths into the search box like the Run dialog. For example, C:\Program Files or \\Windows-PC\ . It has auto-complete functionality.

    - Substring matches: Classic Shell's search box supports partial word matches. So you can type: torrent instead of µTorrent. Or RAR instead of WinRAR. Fox instead of Firefox. Or you can type the beginning few letters of each word: e.g. w m p for Windows Media Player, or rem conn for Remote Desktop Connection.

    - Wildcard filtering: The search box supports wildcard filtering so you could also type this into the Start Menu's search box: C:\YourFolderContainingEXEs\*.exe or C:\YourFolderContainingEXEs\w*.dll and so on. You can also use environment variables. e.g. %tmp%\*.log or %windir%\system32\*.msc

    - Web search without privacy risks: You can type anything into the search box and then select "Search the internet". This opens your default web browser and performs a web search. This is better than passing every query you type directly to web search engines or opening web search results outside the browser.

    Search providers (Classic styles only):

    The classic styles of the Start Menu allow you to register additional "search providers", which you can use to pass on the text you type into the search box to other programs. This can be any program that accepts text at the command line - your favorite desktop search tool or even web search. This is done by adding sub-items for the Search box from the Customize Start Menu tab: This can be explained better with an example for the excellent search tool called "Everything".

    For example, to create a search provider for Everything:

    ● Go to the Customize Start Menu tab in Classic Start Menu settings (Classic style only).
    ● Insert a custom item as a subitem for the search box (Custom is the last item in the right column). Dragging the custom item over the Search box in the left column.
    ● Double click this custom item to edit it and in the Command field, type:
    "C:\Program Files\Everything\Everything.exe" -search "%1"
    ● Give it a name (Label), icon and tip if you want. Click OK twice to save all settings.

    The result will be what the screenshot below shows:

    [​IMG]

    Now when you type something in the Classic Start Menu search box, and click "Search using Everything", it will pass on the search box's contents to a new window in Everything. If you set the Label to something like "Search using &Everything" then pressing Alt+E will directly pass it to Everything. The ampersand ('&') defines the keyboard shortcut. %1 is replaced by the contents of the search box. If you use %2 it will be replaced by the url-style encoded search text.

    Here are a few possible commands:

    ● Search with Agent Ransack: "C:\Program Files\Agent Ransack\AgentRansack.exe" -r -f "%1"
    ● Search with Everything: "C:\Program Files\Everything\Everything.exe" -search "%1"
    ● Search with Google: http://www.google.com/#q=%2
    ● Search with Bing: http://www.bing.com/search?q=%2
    ● Search with Google and directly open the first search result (as if you pressed the button "I'm Feeling Lucky"):
    http://www.google.com/search?btnI=I'm+Feeling+Lucky&q=%2
    ● Search Google Images directly from Start Menu: http://images.google.com/images?q=%2&ie=UTF-8&oe=UTF-8&hl=en
    ● Search Wikipedia directly from the Start Menu: http://en.wikipedia.org/w/index.php?title=Special:Search&search=%2
    ● Search Google News directly from the Start Menu: http://www.google.com/search?tbm=nws&q=%2
    Search only English pages on Google: http://www.google.com/search?hl=en&as_qdr=all&q=%2&btnG=Search&lr=lang_en

    [​IMG]
    It's like you almost got back your lost Internet Explorer Search box back ;)

    Searching with the Advanced Query Syntax:

    The Classic Shell 4.0 Start Menu supports the same powerful Advanced Query Syntax (AQS) that Windows Explorer search supports. Unfortunately, the main problem with the AQS is that it's too long and complex to remember. Also, the Start Menu doesn't yet autocomplete the properties or their values, like how Windows 7 and later Explorer populates the values once you type the property. Nevertheless, here are some of the useful properties you may use to search in the Start Menu:

    For searching generic files:
    ******************************
    you can either type the name directly or use operators such as AND, OR and NOT.

    NOT or use the — to exclude items (e.g #1): *.jpg -Nature (e.g. #2): kind:music NOT:*.wav
    OR for results matching x OR y (e.g. Windows 7 OR 8)
    AND for both (e.g. Windows 7 AND 8)
    Enclose results in double quotes for exact phrase search (e.g. "Classic Shell")

    or filter by any of these properties:

    size:empty,tiny,small,medium,large,huge,gigantic
    size:<=5MB
    size:>=300MB

    kind:contacts, email, im, docs, music, song, playlist, pics, pictures, videos, movie, folders, tasks, notes, calendar, programs, link, tv, journal, feed
    type:
    contenttype:
    ext:
    folder:
    folderpath:
    keywords:
    tags:
    attributes:
    owner:
    EncryptionStatus:Encrypted/Unencrypted
    IsEncrypted:Encrypted/Unencrypted
    url:

    Date-related properties:
    ***************************
    before:MM/dd/yyyy
    after:MM/dd/yyyy
    date:today, yesterday, thisweek, lastweek, thismonth, lastmonth, thisyear, lastyear
    date:Sunday
    date:January
    modified:last week
    created:
    accessed:

    documents:
    **************
    author: or authors:
    title:
    subject:
    lastsavedby:
    comments:
    slides:
    lastprinted:
    CharacterCount:
    lastsaved:
    LineCount:
    Pages:
    ParagraphCount:
    WordCount:
    Protected:No/Yes


    music:
    *******
    album:
    genre:
    bitrate:>128kbps
    duration:0:00
    length:
    year:>1977
    track:10
    lyrics:
    rating:
    composer:
    conductor:

    contacts:
    **********
    birthday:tomorrow
    anniversary:yesterday

    photos:
    ********
    orientation:landscape
    cameramake:nikon
    datetaken:MM/dd/yyyy
    dimensions:8x10
    width:1600
    height:1200
    Bitdepth:
    Compression:
    HorizontalResolution:
    VerticalResolution:
    Aperture:
    MaxAperture:
    CameraModel:
    DigitalZoom:
    FlashMode:
    ExposureTime:
    ExposureBias:
    Lightsource:
    FocalLength:
    ISOSpeed:
    MeteringMode:
    PeopleTags:
    ShutterSpeed:
    WhiteBalance:
    ExposureProgram:
    F-Stop:
    ProgramMode:
    Saturation:

    video:
    ********
    EncodedBy:
    Video Compression:
    Director:
    DataRate:
    FourCC:
    Frameheight:
    Framewidth:
    framerate:
    TotalBitrate:

    programs:
    ************
    Program:
    company:
    copyright:
    programname:
    linktarget:

    Email:
    *******
    hasattachment:no/yes
    is:attachment
    attachment:
    importance:high/normal/low
    from:
    to:
    cc:
    bcc:
    isdeleted:no/yes
    title:
    hasflag:no/yes
    isread:read/unread

    This is not a complete list of properties. For a mostly complete Advanced Query Syntax, see this PDF document: http://www.donationcoder.com/forum/index.php?action=dlattach;topic=18016.0;attach=40673
     

Share This Page