6

This is a follow-up question from this one. As demonstrated by that answer, ProgrammaticAccessOnly can be used to hide certain context menu items without disabling their underlying or related functions.

In this way, it seems like a more useful analogue to the LegacyDisable string value, in that it can be used to disable registry functions in a less destructive way than LegacyDisable does.

However, as with many other Registry value-data pairs, actual documentation on the value and how exactly it works, from Microsoft or other authoritative sources, are hard to come by. All I've been able to find outside of disparate forum posts is the following, from a tutorial here:

ProgrammaticAccessOnly is a special value that hides a context menu entry but allows programs to access it if required.

This is far from comprehensive, and I doubt the value's scope is limited to context menus. For example, ProgrammaticAccessOnly=Apartment is detailed at least once here, with no explanation of what it does or other data types.

How exactly does the ProgrammaticAccessOnly string value in the Registry work? Are there any caveats to always using it over LegacyDisable? Also, what is a list of all the possible data types that can be used with it?

2
  • I find a ProgrammaticAccessOnly=Apartment value in HKCR\*\shell\removeproperties. Here is an article using that registry value link.
    – Biswapriyo
    Aug 31, 2017 at 12:49
  • I find this ProgrammaticAccessOnly registry in shell32.dll with IDA64. See this IMAGE. @ben-n may find this helpful just like this answer.
    – Biswapriyo
    Aug 31, 2017 at 13:00

1 Answer 1

5
+50

I have answered your post about LegacyDisable and have some knowledge of the subject. As this post does not have answers, I'll try, although my answer may not be satisfactory.

The problem with these registry items is that they are undocumented. Each new version of Windows may add some more or invalidate others. Since they are undocumented, Microsoft keeps the freedom of freely modifying whatever it likes, so the burden of verifying whether they still work or not falls on the users.

Information about these items comes from Microsoft in all sort of unofficial channels. Sometimes they are found in SDK samples or on the MSDN, sometimes in forum answers by Microsoft engineers, and sometimes from clients of Microsoft that had privileged access to Microsoft engineers.

I have found one person who has compiled a list of all known such items in the article File Type Registration, each with explanation and a link to documentation. Not too surprising, most of the items don't have documentation links.

As regarding ProgrammaticAccessOnly, this article only says "Removes verb from IContextMenu enumeration?", but has no documentation link.

Searching via google, i have found a Winaero article that says:

ProgrammaticAccessOnly does the main trick. It is a special parameter which tells the Windows Explorer shell that the context menu item can only be accessed by software programmatically. The user interface gets locked down, so the command disappears from the context menu!

Together, it seems that these special registry items are recognized by the IContextMenu interface, which:

Exposes methods that either create or merge a shortcut menu associated with a Shell object.

The IContextMenu interface is exported by Shell extension handlers, chiefly used by Windows Explorer.

In summary, the presence of ProgrammaticAccessOnly causes the shell enumeration to ignore the shell item, but programs can still refer to and update it via the IContextMenu interface or directly by modifying the registry.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .