PDA

View Full Version : "Open in New Window" in the popup menu on drives


Eric
February 1st 06, 08:20 AM
Could you tell me what modification to Windows registry will add the "Open
in New Window" command to the popup menu, which, by right-click, pops up
from a drive icon in Windows Explorer?

I usually prefer to open folders or drives in the same window. So, I keep
"Open each folder in the same window" selected in the General tab of Folder
Options. However, I sometimes want to temporarily override this setting and
want to open a folder or a drive in its own new window.

For folders, I already appropriately modified
HKCR\Directory\shell\opennew\command
and have been enjoying the feature of "Open in New Window" in the popup menu.


However, for drives, the above modification does not work out. For drives,
I do not know what modification will add the "Open in New Window" command in
the popup menu. Does anyone know the modification for this purpose?

By the way, control-double-clicking a drive or a folder will open it in its
own window, if Windows Explorer is in the plain view but not in the "Folders
view" with a tree. On the other hand, the "Open in New Window" command in
the popup menu opens the folder no matter whether Windows Explorer is in the
plain view or in the "Folders view".

Eric
February 1st 06, 08:54 AM
I inadvertently omitted a few words in my previous message. Let me correct
the last sentence in the last paragraph in my last message.

On the other hand, the "Open in New Window" command in the popup menu opens
the folder in its own new window, no matter whether Windows Explorer is in
the plain view or in the "Folders view".

Eric
February 1st 06, 02:00 PM
I wrote:

> I usually prefer to open folders or drives in the
> same window. So, I keep "Open each folder in the
> same window" selected in the General tab of Folder
> Options. However, I sometimes want to temporarily
> override this setting and want to open a folder or
> a drive in its own new window.
>
> Could you tell me what modification to Windows
> registry will add the "Open in New Window" command
> to the popup menu, which, by right-click, pops up
> from a drive icon in Windows Explorer?

No one has answered my question, yet. Nevertheless, I may have found an
answer on my own.

In the key HKCR\Drive\shell,
create a new key, namely, "opennew".

In the opennew key ,
create a new key, namely, "command"

The key path will be
HKCR\Drive\shell\opennew\command

In the opennew key, set the value to the following.

value name: (Default)
value type: REG_SZ
value data: Open in New Window

In the command key, set the value to the following.

value name: (Default)
value type: REG_SZ
value data: explorer %1

For folders, do the same things in HKCR\Directory\shell\

I found this method for drives a few minutes ago. It works on my PC so far.


Did anyone know of this method of "Open in New Window" for drives? Has
anyone been using this method for many months without any noticeable side
effect like making the system unstable?

David Candy
February 1st 06, 02:19 PM
It's well known. It fine. But really you only do these two areas for FILE type commands.

BUT

You should be doing it on Folders, not File Folders or Drives. Then it will do everything. File Folder, Drive, or any other type of folder. I posted a reg file to another thread that does just that.

Windows Registry Editor Version 5.00

;----------------------------------
;Binary View
;Uses Edit to give a Binary view of the file
;----------------------------------
[HKEY_CLASSES_ROOT\*\Shell\BinaryView]
@="&Binary View"
"Extended"=""
[HKEY_CLASSES_ROOT\*\Shell\BinaryView\command]
@="Edit.com /78 /r /h %L"

;----------------------------------
;Text View
;Uses Wordpad to edit any text file
;----------------------------------
[HKEY_CLASSES_ROOT\*\Shell\TextView]
@="&Text View"
"Extended"=""
[HKEY_CLASSES_ROOT\*\Shell\TextView\command]
@="wordpad.exe \"%1\""

;----------------------------------
;Print Directory Lists
;----------------------------------
;Prints direct to printer
;----------------------------------
[HKEY_CLASSES_ROOT\Directory\shell\Print]
"Extended"=""
[HKEY_CLASSES_ROOT\Directory\shell\Print\Command]
@="cmd.exe /k dir %L> Prn"

;----------------------------------
;To add a command to the context menu to print a directory listing to a file on the desktop.
;----------------------------------
[HKEY_CLASSES_ROOT\Directory\shell\List]
@="&List"
"Extended"=""
[HKEY_CLASSES_ROOT\Directory\shell\List\command]
@=hex(2):63,00,6d,00,64,00,2e,00,65,00,78,00,65,00 ,20,00,2f,00,63,00,20,00,64,\
00,69,00,72,00,20,00,22,00,25,00,4c,00,22,00,3e,00 ,20,00,22,00,25,00,75,00,\
73,00,65,00,72,00,70,00,72,00,6f,00,66,00,69,00,6c ,00,65,00,25,00,5c,00,64,\
00,65,00,73,00,6b,00,74,00,6f,00,70,00,5c,00,44,00 ,69,00,72,00,6c,00,69,00,\
73,00,74,00,2e,00,74,00,78,00,74,00,22,00,00,00

;----------------------------------
;Add Register to OCX
;----------------------------------
[HKEY_CLASSES_ROOT\ocxfile\Shell\Register]
"Extended"=""
[HKEY_CLASSES_ROOT\ocxfile\Shell\Register\command]
@="Regsvr32.exe \"%1\""

;----------------------------------
;Add UnRegister to OCX
;----------------------------------
[HKEY_CLASSES_ROOT\ocxfile\Shell\Unregister]
"Extended"=""
[HKEY_CLASSES_ROOT\ocxfile\Shell\Unregister\command]
@="Regsvr32.exe /u \"%1\""

;----------------------------------
;Add Register to DLL
;----------------------------------
[HKEY_CLASSES_ROOT\dllfile\Shell\Register]
"Extended"=""
[HKEY_CLASSES_ROOT\dllfile\Shell\Register\command]
@="Regsvr32.exe \"%1\""

;----------------------------------
;Add UnRegister to DLL
;----------------------------------
[HKEY_CLASSES_ROOT\dllfile\Shell\Unregister]
"Extended"=""
[HKEY_CLASSES_ROOT\dllfile\Shell\Unregister\command]
@="Regsvr32.exe /u \"%1\""

;----------------------------------
;Add Registers exe files
;----------------------------------
[HKEY_CLASSES_ROOT\exefile\shell\Register]
"Extended"=""
[HKEY_CLASSES_ROOT\exefile\shell\Register\command]
@="\"%1\" /reg"

;----------------------------------
;Add Unregisters exe files
;----------------------------------
[HKEY_CLASSES_ROOT\exefile\shell\Unregister]
"Extended"=""
[HKEY_CLASSES_ROOT\exefile\shell\Unregister\command]
@="\"%1\" /unreg"

;----------------------------------
;Add Install to OCX
;----------------------------------
[HKEY_CLASSES_ROOT\ocxfile\Shell\Install]
"Extended"=""
[HKEY_CLASSES_ROOT\ocxfile\Shell\Install\command]
@="Regsvr32.exe /i \"%1\""

;----------------------------------
;Add Install to DLL
;----------------------------------
[HKEY_CLASSES_ROOT\dllfile\Shell\Install]
"Extended"=""
[HKEY_CLASSES_ROOT\dllfile\Shell\Install\command]
@="Regsvr32.exe /i \"%1\""

;----------------------------------
;Add Command prompt here to Directories
;----------------------------------
[HKEY_CLASSES_ROOT\Directory\shell\DosPrompt]
@="Command Prompt Here"
"Extended"=""
[HKEY_CLASSES_ROOT\Directory\shell\DosPrompt\comman d]
@="cmd.exe /k cd %L"

;----------------------------------
;Add Command prompt here to Drives
;----------------------------------
[HKEY_CLASSES_ROOT\Drive\shell\DosPrompt]
@="Command Prompt Here"
"Extended"=""
[HKEY_CLASSES_ROOT\Drive\shell\DosPrompt\command]
@="cmd.exe /k cd %L"

;----------------------------------
;Add Explorer rooted at folders
;----------------------------------
[HKEY_CLASSES_ROOT\Folder\shell\rooted]
@="Explorer rooted at"
"Extended"=""
[HKEY_CLASSES_ROOT\Folder\shell\rooted\command]
@="Explorer.exe /e,/root,/idlist,%I"

;----------------------------------
;Add New Explore window
;----------------------------------
[HKEY_CLASSES_ROOT\Folder\shell\new]
@="New Window"
"Extended"=""
[HKEY_CLASSES_ROOT\Folder\shell\new\command]
@="Explorer.exe /n,/idlist,%I"


--
--------------------------------------------------------------------------------------------------
Goodbye Web Diary
http://margokingston.typepad.com/harry_version_2/2005/12/thank_you_and_g.html#comments
=================================================
"Eric" > wrote in message . ..
>I wrote:
>
>> I usually prefer to open folders or drives in the
>> same window. So, I keep "Open each folder in the
>> same window" selected in the General tab of Folder
>> Options. However, I sometimes want to temporarily
>> override this setting and want to open a folder or
>> a drive in its own new window.
>>
>> Could you tell me what modification to Windows
>> registry will add the "Open in New Window" command
>> to the popup menu, which, by right-click, pops up
>> from a drive icon in Windows Explorer?
>
> No one has answered my question, yet. Nevertheless, I may have found an
> answer on my own.
>
> In the key HKCR\Drive\shell,
> create a new key, namely, "opennew".
>
> In the opennew key ,
> create a new key, namely, "command"
>
> The key path will be
> HKCR\Drive\shell\opennew\command
>
> In the opennew key, set the value to the following.
>
> value name: (Default)
> value type: REG_SZ
> value data: Open in New Window
>
> In the command key, set the value to the following.
>
> value name: (Default)
> value type: REG_SZ
> value data: explorer %1
>
> For folders, do the same things in HKCR\Directory\shell\
>
> I found this method for drives a few minutes ago. It works on my PC so far.
>
>
> Did anyone know of this method of "Open in New Window" for drives? Has
> anyone been using this method for many months without any noticeable side
> effect like making the system unstable?

Eric
February 1st 06, 10:51 PM
Thank you very much, David.

> You should be doing it on Folders, not File Folders
> or Drives. Then it will do everything.
> File Folder, Drive, or any other type of folder.

I modified two places, namely,
HKCR\Drive\
and
HKCR\Directory\

So, you are saying that I could have achieved the same (or even better)
result by modifying only one place, namely,
HKCR\Folder\
are you not?

Following your advice, I deleted
HKEY_CLASSES_ROOT\Drive\shell\opennew
and
HKEY_CLASSES_ROOT\Directory\shell\opennew

and tried:

[HKEY_CLASSES_ROOT\Folder\shell\opennew]
@="Open in New Window"

[HKEY_CLASSES_ROOT\Folder\shell\opennew\command]
@="explorer %1"

It works. Thanks, David.

By the way, in your reply, I did not understand the parameters
/e,/root,/idlist,%I
/n,/idlist,%I"
for Explorer.exe

In fact, I do not even understand the meaning of the parameter
%1
in "explorer %1".

Could you explain them to me?

David Candy
February 2nd 06, 05:26 AM
1. Yes.

2. My way is similar to 1. It's better and works more places. In fact folders on it's own without %I removes the benefit of doing it at Folder.

In explorer there is only objects. Not all are files. %1 is the long file name (and a short file name in old programs). %L is always the long file name. %I is the object path (nothing to do with files and folders though files and folders can and are objects). Explorer uses %I.

--
--------------------------------------------------------------------------------------------------
Goodbye Web Diary
http://margokingston.typepad.com/harry_version_2/2005/12/thank_you_and_g.html#comments
=================================================
"Eric" > wrote in message . ..
> Thank you very much, David.
>
>> You should be doing it on Folders, not File Folders
>> or Drives. Then it will do everything.
>> File Folder, Drive, or any other type of folder.
>
> I modified two places, namely,
> HKCR\Drive\
> and
> HKCR\Directory\
>
> So, you are saying that I could have achieved the same (or even better)
> result by modifying only one place, namely,
> HKCR\Folder\
> are you not?
>
> Following your advice, I deleted
> HKEY_CLASSES_ROOT\Drive\shell\opennew
> and
> HKEY_CLASSES_ROOT\Directory\shell\opennew
>
> and tried:
>
> [HKEY_CLASSES_ROOT\Folder\shell\opennew]
> @="Open in New Window"
>
> [HKEY_CLASSES_ROOT\Folder\shell\opennew\command]
> @="explorer %1"
>
> It works. Thanks, David.
>
> By the way, in your reply, I did not understand the parameters
> /e,/root,/idlist,%I
> /n,/idlist,%I"
> for Explorer.exe
>
> In fact, I do not even understand the meaning of the parameter
> %1
> in "explorer %1".
>
> Could you explain them to me?

Eric
February 3rd 06, 02:25 AM
David Candy wrote:

> In explorer there is only objects. Not all are
> files. %1 is the long file name (and a short file
> name in old programs). %L is always the long file
> name. %I is the object path (nothing to do with
> files and folders though files and folders can and
> are objects). Explorer uses %I.

Thanks, David.

By the way, for

HKCR\Folder\shell\opennew\command

I used "opennew" key under "shell". On the other hand, you used "new" key
under "shell". So, the name of this key, whether "opennew" or "new", does
not matter very much, does it? One can even name it "david" instead of
"new", can he not?

The only significance of the name of this key may be the order of the menu
items in the contextual menu. The alphabetical order of custom keys in
"shell" seems to affect the order of menu items in the contextual menu.

The default items of the contextual menu for folders are "Open", "Explorer",
"Search...", "Sharing and Security...", etc., in this order. My custom menu
item "Open in New Window" appeared below "Explorer". However, after I
renamed the key from "opennew" to "aopennew", the custom menu item "Open in
New Window" appeared above "Explorer".

David Candy
February 3rd 06, 02:49 AM
You can call it late for dinner if you want. The order is based on the order entered in the registry. The keys are then in a specified order - more specific to least specific commands (Directory and drive inheirit from Folders, all files inheirit from *, and all files, directories, and drives inheirit from AllFileSystemObjects).

The menu display text can be set at that key default value, The order of the entire menu can also be set and the default command by listing the verbs in the shell key.

Adding Open in New Window
Copy these lines into a new blank Text Document, edit it to suit, name it IEOpenNew.reg, double click it.

REGEDIT4
[HKEY_CLASSES_ROOT\htmlfile\shell\openinnew]
@="Open in New Window"
[HKEY_CLASSES_ROOT\htmlfile\shell\openinnew\command]
@="\"C:\\PROGRA~1\\INTERN~1\\iexplore.exe\" \"%1\""
Making Open in New Window the Default Double Click Action
Add these two lines in the above reg file (under REGEDIT4 by convention). If IE checks if it is the default browser it will offer to reverse this change if you choose to allow it to.

[HKEY_CLASSES_ROOT\htmlfile\shell]
@="openinnew"
Arranging the Context menu
The shell key can take more than the default value. For shell statements Windows places Open, Explore, Find,and Print first, then other Shell commands in the order they were added to the registry, then shell extension commands. By listing the commands under the Shell key you can rearrange the order.

[HKEY_CLASSES_ROOT\htmlfile\shell]
@="open,openinnew"

--
--------------------------------------------------------------------------------------------------
Goodbye Web Diary
http://margokingston.typepad.com/harry_version_2/2005/12/thank_you_and_g.html#comments
=================================================
"Eric" > wrote in message . ..
> David Candy wrote:
>
>> In explorer there is only objects. Not all are
>> files. %1 is the long file name (and a short file
>> name in old programs). %L is always the long file
>> name. %I is the object path (nothing to do with
>> files and folders though files and folders can and
>> are objects). Explorer uses %I.
>
> Thanks, David.
>
> By the way, for
>
> HKCR\Folder\shell\opennew\command
>
> I used "opennew" key under "shell". On the other hand, you used "new" key
> under "shell". So, the name of this key, whether "opennew" or "new", does
> not matter very much, does it? One can even name it "david" instead of
> "new", can he not?
>
> The only significance of the name of this key may be the order of the menu
> items in the contextual menu. The alphabetical order of custom keys in
> "shell" seems to affect the order of menu items in the contextual menu.
>
> The default items of the contextual menu for folders are "Open", "Explorer",
> "Search...", "Sharing and Security...", etc., in this order. My custom menu
> item "Open in New Window" appeared below "Explorer". However, after I
> renamed the key from "opennew" to "aopennew", the custom menu item "Open in
> New Window" appeared above "Explorer".

Eric
February 3rd 06, 03:48 AM
David Candy wrote:

> The order is based on the order entered in
> the registry.

Thanks again, David.

Google