You have to disable the "Automatic Folder Type Discovery" feature present in Windows Vista and later versions. (This solution is tested on Windows Vista, and probably works on Windows 7 as well. I'm not sure about Windows 8 / 8.1 / 10).
Perform the following steps:
Copy-and-paste way:
Copy the following lines into a new text file, save it as "resetfolders.reg" and double-click it:
Windows Registry Editor Version 5.00
; Reset and delete all saved folder customizations and settings.
[-HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU]
[-HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags]
; Turn off Vista auto folder type template discovery.
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell]
"FolderType"="NotSpecified"
; Modify the storage space to 10000 for saving of up to 10000 folder settings.
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell]
"BagMRU Size"=dword:00002710
Long way:
1. Reset the folder options:
- In Windows Explorer, click Organize -> Folder and Search Options -> View tab -> Folder Options -> Reset Folder
- The above can also be done by removing the registry keys HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags and its subkeys and HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU and its subkeys.
- go to Folder Options (Organize -> Folder and Search Options) View tab, and make sure the Remember each folder’s view settings is checked.
- Close the Explorer window after changes to save the settings. Windows Vista will only remember the state of folders of the window is closed.
2. Disable auto discovery:
- Start Regedit, navigate to the key HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell and perform the following steps:
- Right click on Shell in left pane, select New and then click Key.
- Type Bags to create a key named Bags, and press Enter.
- Right click on Bags that just been created, select New and then click Key.
- Type AllFolders to create a sub-key named AllFolders, and and press Enter.
- Right click on AllFolders that just been created, select New and then click Key.
- Type Shell to create another subkey named Shell, and then press Enter.
- Select Shell key that just been created, and then right click on an empty area in the right pane, click on New and then select String Value.
- Type FolderType as the value name, and press Enter.
- Right click on the Folder Type and click Modify or simply double click on FolderType.
- Type NotSpecified as its value data.
- Click OK.
3. Increasing the BagMRU Cache Memory Size
- Run Registry Editor (regedit).
- Navigate to the following registry key: HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell
- If there is not a BagMRU Size value, right click on a blank space in the right pane, then select New, and then click DWORD (32-bit) Value. Then, type BagMRU Size as the value name.
- Double click on BagMRU Size key just created, and then enter 10000 (in decimal base) or 2710 (in hexadecimal base) as its value data.
(source)