- Home
- Windows XP
- Customize
- How to launch Search Companion with the "Look in" option pointing to a specific folder or drive?
- Home
- Windows XP
- Scripts
- How to launch Search Companion with the "Look in" option pointing to a specific folder or drive?
How to launch Search Companion with the "Look in" option pointing to a specific folder or drive?
Would you like to have a shortcut which launches Search Companion with the default "Look in" option, pointing to a specific folder or drive? The script below does that exactly:
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\")
Set objFolderItem = objFolder.ParseName("myfolder")
objFolderItem.InvokeVerb("find")
The above script opens a Search window with the folder C:\Myfolder as the default target in the "Look in" box. If you want a different path, edit the script accordingly. Then copy the above code to Notepad, save the above contents to a file with .VBS extension (Search.VBS) and then place the shortcut of the script in your Quick Launch folder.
To open Search companion with a specified drive chosen as the default, use the following:
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(&H11&)
Set objFolderItem = objFolder.ParseName("D:\")
objFolderItem.InvokeVerb("find")
If you enjoyed this post, make sure you
subscribe to our RSS feed!
We feature Tips, Troubleshooting information, Scripts and Utilities for Microsoft Windows Operating Systems!
Prefer an E-mail subscription?
2 Responses to "How to launch Search Companion with the "Look in" option pointing to a specific folder or drive?" 
|
said this on 20 Aug 2006 10:04:38 AM PST
Hi ! I finally implemented all the instructions on this suggestion; and it works LIKE A CHARM !!! You folks are really good; and I'm really glad to know that you're out there for your expertise ! Thank You Again !!! Ed VA
|
|
said this on 31 Mar 2009 11:34:44 PM PST
Umm. How do u create, save, and launch the above script?
Editor's Note: @Sam: Copy the lines to Notepad and save the files with .vbs extension. Double-click to run it.
|

Author)