How to set different Windows 7 Explorer layouts for different windows (with/without navigation pane)

Frequently I'd like to open a Windows Explorer window and turn off the Navigation pane so it's nice and compact. But in my other Windows Explorer windows I want the Navigation pane to still be visible. If I use the Organize > Layout > Navigation Pane option to remove the navigation pane from window A and then in window B I navigate to a different folder window B's navigation pane disappears. i.e. layout changes made in one window apply to all windows.

Note I don't want the layout to apply to specific folders, but rather to specific Explorer windows. I'm not concerned about these changes persisting across windows restarts.


Solution 1:

Since we're name twins, I feel like I really have to try and answer this one.

It's not a perfect solution, but I'd suggest installing AutoHotKey and creating a shortcut key which toggles the navigation pane on and off. In Windows 8 This can be done with the keys Alt,V,N,Space. In Win7 it should be very similar.

After installing AutoHotKey, you can create the following script

F12::
ID := WinExist("A")
WinGetClass,Class, ahk_id %ID%
WClasses := "CabinetWClass ExploreWClass"
IfInString, WClasses, %Class%
{
    Send !vn{Space}
}
return

This maps F12 to toggle the Navigation Bar, only when in Explorer. In any other app F12 will continue to do whatever it does in that app.

If it turns out the shortcut keys in Win7 are different then it's easy enough to discover and change them. Just press Alt in explorer and see what comes up!

It's not a perfect solution of course. As you switch between windows you'll probably need to continually toggle it on and off, but it's a lot faster than running .bat files off the desktop.

Another alternative, as some mentioned, is using an alternative explorer. I couldn't work without xplorer2, I'd highly recommend it.

Solution 2:

According to my research, the layout of Explorer is determined by the registry entry PageSpaceControlSizer found in :
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Modules\GlobalSettings\Sizer.

This registry key is consulted whenever a new Explorer window is opened or whenever the displayed folder is changed.

The idea is therefore to create two .reg files with the contents of this registry entry when the navigation pane is on or off. The contents can be exported from inside regedit. The following are derived from my layout.

nav_on.reg

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Modules\GlobalSettings\Sizer]
"PageSpaceControlSizer"=hex:ce,00,00,00,01,00,00,00,00,00,00,00,10,04,00,00

nav_off.reg

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Modules\GlobalSettings\Sizer]
"PageSpaceControlSizer"=hex:ce,00,00,00,00,00,00,00,00,00,00,00,10,04,00,00

You can then create two batch (.bat) files that will either use the reg command or just do a silent import of the .reg file :

regedit /s nav_on.reg

Creating two shortcuts on the desktop for the two batch files will give you the means to switch the navigation pane on or off for the next Explorer window or folder.

If you really wish to get fancy, you can also create two Explorer shell extensions that will add to the right-click menu the options of "Open with nav pane" and "without".

For a starting point see this article :
The Complete Idiot's Guide to Writing Shell Extensions.