Help: How open Win Exp with search open on left side?

A

Andy

A folder can be displayed in the two-pane view of Windows Explorer by
using a command like:

EXPLORER.EXE /E, <folderpath>

What command would I use so that when I open that folder, the left side
shows the SEARCH function.

Thank you
Andy


[If I was doing this manually I would use F3 or CTRL-E to get SEARCH.]
 
R

Ramesh, MS-MVP

news://msnews.microsoft.com/[email protected]

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


A folder can be displayed in the two-pane view of Windows Explorer by
using a command like:

EXPLORER.EXE /E, <folderpath>

What command would I use so that when I open that folder, the left side
shows the SEARCH function.

Thank you
Andy


[If I was doing this manually I would use F3 or CTRL-E to get SEARCH.]
 
R

Ramesh, MS-MVP

news://msnews.microsoft.com/[email protected]

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


A folder can be displayed in the two-pane view of Windows Explorer by
using a command like:

EXPLORER.EXE /E, <folderpath>

What command would I use so that when I open that folder, the left side
shows the SEARCH function.

Thank you
Andy


[If I was doing this manually I would use F3 or CTRL-E to get SEARCH.]
 
D

David Candy

That code isn't complete. I didn't write the function to check if Show Full Path in Titlebar is on or off. I was leaving that to you.

objShell.Open "c:\somewhere"
For Each window in AllWindows
If window.title="somewhere" then a=window.ShowBrowserBar("{EFA24E61-B078-11d0-89E4-00C04FC9E26E}", True)
Next

Is the code if the user is using Windows defaults settings. User replaces C:\somewhere with their path and in
If window.title="somewhere"
with the folder name.
 
R

Ramesh, MS-MVP

Yup, knew that David. I should have mentioned it.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


"David Candy" <.> wrote in message
That code isn't complete. I didn't write the function to check if Show Full
Path in Titlebar is on or off. I was leaving that to you.
 
R

Ramesh, MS-MVP

Anothing thing is that the GUID "{EFA24E61-B078-11d0-89E4-00C04FC9E26E}" is
for Favorites band. For Search band, use
"{30D02401-6A81-11D0-8274-00C04FD5AE38}"

Alternately:

- - -
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\")
Set objFolderItem = objFolder.ParseName("myfolder")
objFolderItem.InvokeVerb("find")
- - -

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Yup, knew that David. I should have mentioned it.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


"David Candy" <.> wrote in message
That code isn't complete. I didn't write the function to check if Show Full
Path in Titlebar is on or off. I was leaving that to you.
 
A

Andy

This now reads from top to bottom.

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

news://msnews.microsoft.com/[email protected]
Regards,
Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]

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

This says:
------------------START--------------------
{C4EE31F3-4768-11D2-BE5C-00A0C9A83DA1}
is search for files.


objShell.Open "c:\somewhere"
For Each window in AllWindows
If CheckRegEntryForFullPathInTitlebar() = True then
If window.title="c:\somewhere" then a=window.ShowBrowserBar
("{EFA24E61-B078-11d0-89E4-00C04FC9E26E}", True)
else
If window.title="somewhere" then a=window.ShowBrowserBar
("{EFA24E61-B078-11d0-89E4-00C04FC9E26E}", True)
end if
Next
-------------------END----------------------



That code isn't complete. I didn't write the function to check if
Show Full Path in Titlebar is on or off. I was leaving that to you.

objShell.Open "c:\somewhere"
For Each window in AllWindows
If window.title="somewhere" then
a=window.ShowBrowserBar("{EFA24E61-B078-11d0-89E4-00C04FC9E2
6E}", True)
Next

Is the code if the user is using Windows defaults settings. User
replaces C:\somewhere with their path and in If
window.title="somewhere" with the folder name.

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


Anothing thing is that the GUID
"{EFA24E61-B078-11d0-89E4-00C04FC9E26E}" is for Favorites band. For
Search band, use "{30D02401-6A81-11D0-8274-00C04FD5AE38}"

Alternately:

- - -
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\")
Set objFolderItem = objFolder.ParseName("myfolder")
objFolderItem.InvokeVerb("find")


=========================================================-

I am the OP and it is brilliant for me that you guys have applied your
technical knowledge. Thank you.

Unfortunately I am not at all familar with what I do with this code. I
am happy enough making changes in the registry but is that where that
code goes?

Can someone tell me what I need to do with it. Thanks agaIn!
 
R

Ramesh, MS-MVP

-------------------------------------
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\")
Set objFolderItem = objFolder.ParseName("myfolder")
objFolderItem.InvokeVerb("find")
-------------------------------------

Copy the above code to Notepad, and save as "Search.VBS". Double-clicking
the file will open a Search window, with the default folder "C:\Myfolder"
selected.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


This now reads from top to bottom.

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

news://msnews.microsoft.com/[email protected]
Regards,
Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]

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

This says:
------------------START--------------------
{C4EE31F3-4768-11D2-BE5C-00A0C9A83DA1}
is search for files.


objShell.Open "c:\somewhere"
For Each window in AllWindows
If CheckRegEntryForFullPathInTitlebar() = True then
If window.title="c:\somewhere" then a=window.ShowBrowserBar
("{EFA24E61-B078-11d0-89E4-00C04FC9E26E}", True)
else
If window.title="somewhere" then a=window.ShowBrowserBar
("{EFA24E61-B078-11d0-89E4-00C04FC9E26E}", True)
end if
Next
-------------------END----------------------



That code isn't complete. I didn't write the function to check if
Show Full Path in Titlebar is on or off. I was leaving that to you.

objShell.Open "c:\somewhere"
For Each window in AllWindows
If window.title="somewhere" then
a=window.ShowBrowserBar("{EFA24E61-B078-11d0-89E4-00C04FC9E2
6E}", True)
Next

Is the code if the user is using Windows defaults settings. User
replaces C:\somewhere with their path and in If
window.title="somewhere" with the folder name.

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


Anothing thing is that the GUID
"{EFA24E61-B078-11d0-89E4-00C04FC9E26E}" is for Favorites band. For
Search band, use "{30D02401-6A81-11D0-8274-00C04FD5AE38}"

Alternately:

- - -
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\")
Set objFolderItem = objFolder.ParseName("myfolder")
objFolderItem.InvokeVerb("find")


=========================================================-

I am the OP and it is brilliant for me that you guys have applied your
technical knowledge. Thank you.

Unfortunately I am not at all familar with what I do with this code. I
am happy enough making changes in the registry but is that where that
code goes?

Can someone tell me what I need to do with it. Thanks agaIn!
 
B

Bert Kinney

Very nice Ramesh.

One question, can it be made to default to the root of C:\?


--
Regards,
Bert Kinney MS-MVP Shell/User
http://bertk.mvps.org


Ramesh said:
-------------------------------------
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\")
Set objFolderItem = objFolder.ParseName("myfolder")
objFolderItem.InvokeVerb("find")
-------------------------------------

Copy the above code to Notepad, and save as "Search.VBS".
Double-clicking the file will open a Search window, with the default
folder "C:\Myfolder" selected.
Regards,
Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]

=========================================================
 
R

Ramesh, MS-MVP

Thanks Bert.

For C:\
- - -
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(&H11&)
Set objFolderItem = objFolder.ParseName("C:\")
objFolderItem.InvokeVerb("find")
- - -

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Very nice Ramesh.

One question, can it be made to default to the root of C:\?


--
Regards,
Bert Kinney MS-MVP Shell/User
http://bertk.mvps.org


Ramesh said:
-------------------------------------
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\")
Set objFolderItem = objFolder.ParseName("myfolder")
objFolderItem.InvokeVerb("find")
-------------------------------------

Copy the above code to Notepad, and save as "Search.VBS".
Double-clicking the file will open a Search window, with the default
folder "C:\Myfolder" selected.
Regards,
Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]

=========================================================
 
B

Bert Kinney

Excellent! Works perfectly.

I never would have figured out the &H11& part.

--
Regards,
Bert Kinney MS-MVP Shell/User
http://bertk.mvps.org


Ramesh said:
Thanks Bert.

For C:\
- - -
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(&H11&)
Set objFolderItem = objFolder.ParseName("C:\")
objFolderItem.InvokeVerb("find")
- - -

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Very nice Ramesh.

One question, can it be made to default to the root of C:\?



Ramesh said:
-------------------------------------
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\")
Set objFolderItem = objFolder.ParseName("myfolder")
objFolderItem.InvokeVerb("find")
-------------------------------------

Copy the above code to Notepad, and save as "Search.VBS".
Double-clicking the file will open a Search window, with the default
folder "C:\Myfolder" selected.
Regards,
Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]

=========================================================
 
A

Andy

-------------------------------------
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\")
Set objFolderItem = objFolder.ParseName("myfolder")
objFolderItem.InvokeVerb("find")
-------------------------------------

Copy the above code to Notepad, and save as "Search.VBS".
Double-clicking the file will open a Search window, with the
default folder "C:\Myfolder" selected.


Sadly, this doesn't work for me.

When I double-click the new SEARCH.VBS I get a "command box" pop up
and then very quickly it goes away.

Sorry for being thick but it seems as if I need to set something
first.

If it is relevant, I didn't have a My Folder in C:\ so I created one.



[XP Pro/SP2]
 
B

Bert Kinney

Hi Andy,

Right click Search.vbs and change "myfolder" to "windows" or any other
existing folder.

To start the search in the root of C:\ us the latest script posted by
Ramesh.

- - -
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(&H11&)
Set objFolderItem = objFolder.ParseName("C:\")
objFolderItem.InvokeVerb("find")
- - -

--
Regards,
Bert Kinney MS-MVP Shell/User
http://bertk.mvps.org

-------------------------------------
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\")
Set objFolderItem = objFolder.ParseName("myfolder")
objFolderItem.InvokeVerb("find")
-------------------------------------

Copy the above code to Notepad, and save as "Search.VBS".
Double-clicking the file will open a Search window, with the
default folder "C:\Myfolder" selected.


Sadly, this doesn't work for me.

When I double-click the new SEARCH.VBS I get a "command box" pop up
and then very quickly it goes away.

Sorry for being thick but it seems as if I need to set something
first.

If it is relevant, I didn't have a My Folder in C:\ so I created one.



[XP Pro/SP2]
 
D

David Candy

Try
Se&ach

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
Andy said:
-------------------------------------
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\")
Set objFolderItem = objFolder.ParseName("myfolder")
objFolderItem.InvokeVerb("find")
-------------------------------------

Copy the above code to Notepad, and save as "Search.VBS".
Double-clicking the file will open a Search window, with the
default folder "C:\Myfolder" selected.


Sadly, this doesn't work for me.

When I double-click the new SEARCH.VBS I get a "command box" pop up
and then very quickly it goes away.

Sorry for being thick but it seems as if I need to set something
first.

If it is relevant, I didn't have a My Folder in C:\ so I created one.



[XP Pro/SP2]
 
R

Ramesh, MS-MVP

May be a file association problem?

Try the VBS association fix from here:
http://www.dougknox.com/xp/file_assoc.htm
http://www.dougknox.com/xp/fileassoc/xp_vbs_file_association.zip

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


-------------------------------------
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\")
Set objFolderItem = objFolder.ParseName("myfolder")
objFolderItem.InvokeVerb("find")
-------------------------------------

Copy the above code to Notepad, and save as "Search.VBS".
Double-clicking the file will open a Search window, with the
default folder "C:\Myfolder" selected.


Sadly, this doesn't work for me.

When I double-click the new SEARCH.VBS I get a "command box" pop up
and then very quickly it goes away.

Sorry for being thick but it seems as if I need to set something
first.

If it is relevant, I didn't have a My Folder in C:\ so I created one.



[XP Pro/SP2]
 
R

Ramesh, MS-MVP

Thanks Bert. FYI, I picked up the special folder constant from here:
http://www.microsoft.com/technet/scriptcenter/guide/sas_fil_higv.mspx?mfr=true

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Excellent! Works perfectly.

I never would have figured out the &H11& part.

--
Regards,
Bert Kinney MS-MVP Shell/User
http://bertk.mvps.org


Ramesh said:
Thanks Bert.

For C:\
- - -
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(&H11&)
Set objFolderItem = objFolder.ParseName("C:\")
objFolderItem.InvokeVerb("find")
- - -

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Very nice Ramesh.

One question, can it be made to default to the root of C:\?



Ramesh said:
-------------------------------------
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\")
Set objFolderItem = objFolder.ParseName("myfolder")
objFolderItem.InvokeVerb("find")
-------------------------------------

Copy the above code to Notepad, and save as "Search.VBS".
Double-clicking the file will open a Search window, with the default
folder "C:\Myfolder" selected.
Regards,
Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]

=========================================================
 
B

Bert Kinney

Cool! I'll check it out this weekend.

--
Regards,
Bert Kinney MS-MVP Shell/User
http://bertk.mvps.org


Ramesh said:
Thanks Bert. FYI, I picked up the special folder constant from here:
http://www.microsoft.com/technet/scriptcenter/guide/sas_fil_higv.mspx?mfr=true

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Excellent! Works perfectly.

I never would have figured out the &H11& part.


Ramesh said:
Thanks Bert.

For C:\
- - -
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(&H11&)
Set objFolderItem = objFolder.ParseName("C:\")
objFolderItem.InvokeVerb("find")
- - -

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Very nice Ramesh.

One question, can it be made to default to the root of C:\?



Ramesh said:
-------------------------------------
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\")
Set objFolderItem = objFolder.ParseName("myfolder")
objFolderItem.InvokeVerb("find")
-------------------------------------

Copy the above code to Notepad, and save as "Search.VBS".
Double-clicking the file will open a Search window, with the default
folder "C:\Myfolder" selected.

Regards,
Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top