In the Windows Registry, what is the "LegacyDisable" string value and what exactly does it do?

I did some sleuthing work on LegacyDisable that I detail below.

This method is documented by Microsoft in the article Verbs and File Associations - Registering Verbs for Backward Compatibility:

Some applications may search the registry for verb keys that are no longer used. For that purpose, those keys can be left in the registry with the addition of the LegacyDisable value to the verb's key, which tells the system that the verb is not an actual verb, but exists solely for the purpose of backward compatibility.

Use of the LegacyDisable value is shown here. The value only needs to be present; it can be of any value type (though REG_NONE is most appropriate) and does not require any data to be associated with it. If data is present, it is ignored.

* KEY_CLASSES_ROOT
  *  Application
    *   shell
       *  open
            (Default) = &Open
            LegacyDisable
            *  command
                (Default) = command line 

The use of LegacyDisable seems limited for disabling shell-context verbs, as it is always only described in this context.

This method is used by the utility ShellMenuView where it says "this Registry key is not supported by Windows 98", so it seems that it originated in Windows NT.

I have found this method referenced in two books :

  • Windows 7 Annoyances (2010), page 179 :

See a context menu item you want to get rid of? Just delete the corresponding action key (e.g., New, Open, Print), and it’ll disappear immediately. Better yet, add a string value named LegacyDisable to the key to hide it in Windows Explorer without having to delete anything.

  • Windows Registry Troubleshooting, page 100

Under these locations you will see subkeys for the third-party software that has plugged itself into your context menus. There are several ways to handle them. You can delete the keys to remove them completely. To force them to show only on a Shift+right click, add a string value to each called "Extended", or to leave them in the Registry but disable them, add a string value called "LegacyDisable".

I think that is about all the useful information that can be found for LegacyDisable.

As to why CCleaner employs this method together with the other method of destroying the key, I can only make two conjectures:

  1. The code was written by two different programmers, one of whom did not know about LegacyDisable
  2. The key destruction method is used for cases where LegacyDisable does not work (not shell-context verbs).