Get AirVPN and be free online

Tuesday, April 29, 2014

Run Custom Windows 7 Search via Shortcut

We often put documents into folders in Windows and then forget where they were. But that's what's great about searching. In Windows 7 you just type a search string in the top-right corner of an Explorer Window and it's pretty good at finding your files.

If you often search for the same type of file across a broad folder structure, you may find this tip useful as it will show you how to create a Windows shortcut that immediately performs a custom search. It basically just launches a Windows search page and starts running your pre-configured search query straight away!

The sources below helped me to create my first direct Windows shortcut as follows:
  1. To make a shortcut in Windows, just right click inside a Windows Explorer window or on the Desktop and choose New > Shortcut.
  2. Insert the following string as the shortcut path then click Next:
    %SystemRoot%\explorer.exe "search-ms:query=hello&crumb=kind:pics&"
  3. Give your shortcut a name and click ok
The above steps give you a shortcut that searches for pictures with search string “hello”. You can of course change "hello" for another search string, but also make more detailed searches by playing around with other options. Take a look here.

Sources I used to write this.
How to create a search shortcut.
http://www.sevenforums.com/tutorials/36815-search-shortcut-create.html

How to use search-ms protocol
http://msdn.microsoft.com/en-us/library/windows/desktop/bb266520(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ff684385(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/aa965711(v=vs.85).aspx

Here are some more examples of search query strings. I.e. the bit that goes between the quotation marks in the example above.
search-ms:query=microsoft&
search-ms:query=vacation&subquery=mydepartment.search-ms&
search-ms:query=seattle&crumb=kind:pics&
search-ms:query=seattle&crumb=folder:C:\MyFolder&
(source: http://msdn.microsoft.com/en-us/library/windows/desktop/ff684385(v=vs.85).aspx)

No comments:

eXTReMe Tracker