About software, technology and random things


Disabling Windows Vista / 7 / 8 / 10 Explorer’s Automatic Folder Type Discovery


Update from 2015-09-06: I just used this for Windows 10 and it still works!

I very recently installed Windows 7 on my desktop computer and I'm loving it so far.

One of the major things that bugged me though was the new Explorer behavior. The automatic folder type discovery just goes ahead and tries to determine a folder type just by looking at how many (or if there are) files of a certain type (pictures, videos, songs, ...) are in the current folder, and then it adjusts the viewing settings accordingly. For example, if you open a folder that contains mainly video files, it would show those with big icons instead of my default, a detailed list. Pictures are displayed as thumbnails.

Disabling this behavior proved to be interestingly difficult. As with most things that have been declared a default setting by Microsoft, it luckily can be done - but only via registry.

First we need to delete our current folder type settings.

  • Close all open Explorer windows.
  • Open the registry editor with Start => Run => regedit and browse to HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell.
  • Delete and confirm the deletion of the keys BagMRU and Bags.
  • Now create a Key (right-click on the current key in the left pane and select New => Key) called Bags.
  • Create a subkey for Bags called AllFolders.
  • Create a subkey for AllFolders called Shell.
  • Create a String value (right-click in the right pane and select New => String Value) called FolderType and set the value to NotSpecified.
  • That's it for Windows 7. Please read the note for Windows Vista x64 below. Otherwise, just reboot and your new settings should be applied.

That's it for Windows 7. If you're using Windows Vista x64, it might be possible that there is a copy of (or a similar) the Local Settings\Software\Microsoft\Windows\Shell key in HKEY_CURRENT_USER\Software\Classes\Wow6432Node. I could not confirm this for Windows 7, though I am using the 64 bit version (it just had a CLSID subkey, nothing more). In that case, delete the Shell\Bags and Shell\BagMRU folders like I told you above before finishing your modifications with a reboot.

Warning: as always, playing around with the Windows registry can be dangerous when done incorrectly. If you do not feel safe about it, make sure to back up the keys you're about to modify via File => Export, or leave it altogether. I do not take any responsibility for any damage, nor do I give any guarantee that the steps I provided here will work for you. At least they worked for me.

Hopefully that was of help to you 🙂

I discovered the initial instructions on Thank's so much 🙂 Had a hard time finding a guide for that.


AJAX with Chrome – empty responseText

Hi there!

When I implemented AJAX today in a new script of mine and persuaded 😛 a couple of friends of mine to visit the page, I found that the Chrome users received error messages when trying to use the AJAX functions. However, they actually worked. The server received the AJAX request and processed it correctly, leaving me scratching my head.

Turns out that Chrome only received an empty AJAX response in responseText which caused the JavaScript function to throw out an error message. But why was it empty?

A couple of web searches later I realized that apparently not too many people had come across that problem. Luckily enough I found a post in a forum that pushed me in the right direction.

Chrome seems to be a little sensitive concerning headers in the AJAX responses. Because I hadn't given my server-side AJAX processing script the appropriate "Content-Type: text/plain" header, it didn't "accept" the response as text.

Why it has to be so picky, however, I cannot understand 🙂

If you have encountered that problem before, I hope I managed to help you out.

Certainly made me go a little crazy for a while there 😛