Instances of the star type of assocation element are created by passing the corresponding CLSID to the AssocCreateElement function:

CLSID_AssocStarElement {0633B720-6926-404C-B6B3-923B1A501743}

As with all assocation elements, star elements implement the IAssociationElement, IObjectWithQuerySource and IPersistString2 interfaces. However, all the methods of a star element are the same as for the basic shell element except for SetString, QueryString and GetClassID. In effect, a star element is just a shell element with a different query source and a different handling of one particular query.

Initialisation String

When a star element is initialised through its SetString method, the registry key that is used as the query source is necessarily:


The initialisation string is instead remembered, to help generate the friendly type name should it ever be queried. That the initialisation string is meaningful seems to have been missed in Microsoft’s documentation of the ASSOCCLASS_STAR case of the AssocCreateForClasses function.

The FriendlyTypeName Query

Star elements have their own handling of ASSOCQUERY 0x00170000 when put to the QueryString method. For the basic shell element, this query is answered from the FriendlyTypeName value in the element’s query source. For a star element, the friendly type name is instead generated from the initialisation string with help from the SHELL32 string resources.

If the initialisation string is a file extension, i.e., is a period followed by at least one character, then the friendly type name is generated by placing the extension, in upper case and without its leading period, in the %s placeholder in string resource 10112. For any other initialisation string, the friendly type name is the whole of string resource 4130. In the English-language SHELL32, these resolutions are