Registry - Windows 7 - Windows Explorer Settings
Organize
Folder and search options
Navigation pane
Show all folders
Automatically expand to current folder
create a cmd file with
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v NavPaneShowAllFolders /t reg_dword /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v NavPaneExpandToCurrentFolder /t reg_dword /d 1 /f