FIX: Vista Recycle Bin Causes "Windows Explorer has stopped working" DEP error.

It has been said that man is a rational animal. All my life I have been searching
for evidence which could support this.
--  - Bertrand Russell

Vista's DEP (Data Execution Prevention) is designed to prevent unauthorized or dangerous code from executing on your system. However, sometimes legitimate programs such as Windows Media Player or even Windows Explorer may trigger DEP actions, whether legitimate or not. One example is when you have files in the Recycle Bin and you attempt to open Recycle Bin and choose "Empty the Recycle Bin". Data Execution Prevention jumps up with that ugly "Windows Explorer has stopped working" dialog. 




Here's a fix that works for me:

Open Control Panel, and go to  "SYSTEM". On the left side click "Advanced system settings".  Click the "Advanced" tab and under Performance, click Settings. 

Now click on the "Data Execution Prevention" tab. Check the "Turn on DEP for all programs and services exept those I select", then click the Add button.

Go to  your Windows directory and enter the File name Explorer.exe, and  hit OK.

This will bring up a window asking if you are sure you want to do this, just  OK the process.

Now reboot and see if it works.

I think Vista's DEP can cause problems on legitimate proggies  even though it's trying to prevent viruses.


If the above does not work:

Some file types, particularly media files such as .AVI, being present in the Recycle Bin, seem to actually be the cause of this issue. As an alternative, you can run an administrative command prompt, then navigate to the Recycle bin folder with:

CD $Recycle.bin

Then issue this command: (from within the $Recycle.bin directory):

DEL *.* /X /Y /Z /S

This will delete all the weirdo folders under Recycle.bin and their contents, zap all subfolders, and say "Y" to all prompts. With all the contents now gone from the Recycle.Bin, you should be able to open it and not get the DEP error. I've found that making this into a batch file doesn't work; you have to execute the commands manually from within a Command prompt.  I think its unfortunate that we have a 1 1/2 year old operating system that already has a service pack, and this problem hasn't been adequately addressed, but hey - you gotta do what you gotta do.

"BTW" Department

If you have any doubts that .NET and Silverlight aren't making their way onto platforms other than Windows, I suggest you take a quick trip over to Miguel de ICaza's blog and find out where all the excitement is coming from. I see some reallyreallydumb blog posts from so-called "experts" (who usually have some sort of axe to grind) talking about how Silverlight stinks compared to products like Adobe Flex in market adoption. Folks, Silverlight isn't even out of beta yet...