- 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")
Enjoyed the post? Subscribe to our feed to get frequent updates. We feature Tips, Troubleshooting information, Scripts and Utilities for Microsoft Windows Operating Systems! (Click on the Feed icon on the left and subscribe.)
If you prefer an Email subscription, here is the subscription form:
Spread The Word
1 Response 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 PDT
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
|

Author)