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.