A customer wanted to know how to launch Explorer’s Search window with specific fixed search criteria. It turns out that there are two ways of doing this, the poor man’s way and the overachiever’s way.
The overachiever’s way is actually easier to discover. You can use the search-ms protocol to generate a command string that describes the query you want to perform and pass it to ShellExecute
.
The poor man’s way actually requires a little bit of out-of-the-box thinking: Open the Explorer Search window and interactively create the query you want to be able to relaunch later. Now do File, Save Search, and save the query. When you want to relaunch the query, execute the saved search. This is, after all, how end users save and re-use searches.
0 comments