FIX: Windows Vista Folder View Issue

Against stupidity the gods themselves contend in vain.   -- Friedrich von Schiller

I don't know about you, but in our "Things I hate most about Windows Vista" poll, one of the most frequently ticked topics was "Folders that refuse to remember the view settings you've set".  If you set a Details View with "All Items" on a folder and then drop a couple of jpegs in there, Vista tries to "help you" by changing the view. Well, I don't WANT Vista to help me! I don't want Documents, I don't want Pictures and Videos, and I don't like Green Eggs and Ham! (In the forums they are calling it "VisDUH").

Here's a fix from the TechNet forums, converted into a batch file:


set BASE_KEY=HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell

:: Delete cached folder views
reg delete "%BASE_KEY%\Bags" /f
reg delete "%BASE_KEY%\BagMRU" /f

:: Set default folder template
reg add "%BASE_KEY%\Bags\AllFolders\Shell" /v FolderType /d NotSpecified

:: Restart Explorer
taskkill /f /im explorer.exe
start explorer.exe

Just save the above text in a "FIX.BAT" file and execute it. It also restarts Explorer.