Apr 2, 2012 - No Program Associated with Emptying the Recycle Bin Error

Comments

When trying to empty the recycle bin in Microsoft Windows Vista/7/2008/2008 R2 (and probably XP, though it was not tested) via the "Empty the Recycle Bin" option, the following error appears:


I've had this problem in my Windows computer for a few months already but only now I decided to check what it was all about.

For some reason, an important registry key disappeared from my operating system (which isn't statistically weird given that my Windows installation is already 28 months old).

First, I made some research about this problem but it ended up non-conclusive and without solutions nor interesting workarounds.

As such, I will show you how I managed to fix this issue:


1.
I started searching for relevant entries about the recycle bin with the Registry Editor (regedit).

[You can run the Registry Editor by writing "regedit" in the start menu, then right-click the first result that appears and selecting "Run as administrator".]

I stumbled upon the following suspicious key:

HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\empty\command

2.
I went to another computer I had working alright and searched for the same key to find out that the contents were different.

HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\empty\command

3.
I just tried to copy the DelegateExecute String key to my bad Windows installation registry.

However, I had no permissions to write in the original key because it's not supposed to be touched.

When trying to add the missing key, permission was denied 

4.
I used the amazing RegDACL program from Frank Heyne to unlock the key:

In a Windows Command Prompt (or PowerShell) execute the following command (having RegDACL in either the path or the current directory):

[You can run the Command Prompt by writing "cmd" in the start menu, then right-click the first result that appears and selecting "Run as administrator".]

RegDACL.exe HKCR\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\empty\command /GGA:W(NI)

Now it should be possible to change the registry key (if you do it as Administrator):

C:\>RegDACL.exe HKCR\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\empty\command /GGA:F(CI)



RegDACL 6.2 - Permissions Manager for Registry keys for Windows

Copyright (c) 1999-2007 Frank Heyne Software (http://www.heysoft.de)

This program is Freeware, use it on your own risk!





Granting "W(NI)" access for predefined group "Administrators"

 - adding new entry

Don't forget to restore the original permissions afterwards.

5.
Finally I just added a String key named: DelegateExecute with the content: {48527bb3-e8de-450b-8910-8c4099cb8624}, or use the .reg inside the previous key (HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\empty\command) file I provide at the end of this post.

It should look like this after adding the missing key


The problem should now be fixed, if you go to the "Empty the Recycle Bin" option you'll see the familiar dialog:



One more thing. I had a backup key in my computer made by the trial TuneUp Utilities 2012, so it may have been the cause of this issue.

Update of 2012-04-19:

Download the .reg file that fixes the key automatically: DelegateExecute.reg
(you still need to apply the permissions explained earlier)

Useful links:
RegDACL

Mar 22, 2012 - Adding comments in GNS3 IOS baseconfig files

Comments

If you want to write some comments in your GNS3 baseconfig files for the Cisco IOS, you can use the exclamation mark. It is mainly used for separating commands for easier reading. Everything that is written after the exclamation mark is ignored.

Here's an example:

enable ! a comment
configure terminal
interface FastEthernet0/0 ! now I will configure the FastEthernet0/0 interface
ip address 192.168.1.1 255.255.255.0
no shut
!
end


Some links:

Cisco IOS Command Line Interface Tutorial

Mar 18, 2012 - Unable to write inside TEMP environment variable path

Comments

I stumbled upon this beautiful error when trying to re-install my PostgreSQL 9.1.3 server: Unable to write inside TEMP environment variable path.

After some research and trial-and-terror [sic], I came to the conclusion that the essence of the problem had been a tiny change I made to my system's file associations (via Notepad++).

Here's how I solved it and how you can do it too:



I first made some research in the existing community but the solutions I found did not apply to me (I provide some links at the end of the page to these solutions):
  • I checked if it was related to the option "Use temporary folders per session" in the "Remote Desktop Session Host Configuration";
  • I checked the status of "Windows Script Host Settings" (whost.exe);
  • I completely skipped antivirus-related stuff as I don't have any antivirus.

So, to understand why this error was happening, I went to my TEMP folder and read the log from the PostgreSQL installer:

C:\Users\myuser\AppData\Local\Temp\bitrock_installer.log

Which mentioned an interesting detail:
  • Input Error: There is no script engine for file extension ".vbs".
So, I picked up another file from the TEMP folder, the actual script used by the installer:

C:\Users\myuser\AppData\Local\Temp\prerun_checks.vbs

And tried to run it through the console using cscript:

Input Error: There is no script engine for file extension ".vbs".

The same!
I researched a bit more and discovered that the type of file associated with the vbs extension had been changed. In my case, by Notepad++. After I installed Notepad++, I associated some file extensions with it (including vbs), thus causing problems when detecting the type of the script (which shouldn't happen).


Fixing it


Run the almighty regedit, navigate to HKEY_CLASSES_ROOT\.vbs and change the (Default) key back to the string VBSFile. In my case it had been previously altered to Notepad++_file.

How the registry entries looked like before


How the registry entries look when fixed

Then, restart PostgreSQL's installer and everything should go fine.


This is just a possible pair of cause-solution. Other solutions can be reached via some of the links below, don't forget to check them if my post doesn't apply to your issue.


Useful links:
Input Error: There is no script engine for file extension “.vbs”.
Running VBScript and JScript files from the Command Shell
Temporary directory environment variable in Windows Server 2008
Running & Installing PostgreSQL On Native Windows
Collect the installer log file (PostgreSQL)
Unable to write inside TEMP environment path