[This is preliminary documentation and subject to change.]
The default, or unnamed, value of a registry key is shown as "(Default)" or "<No Name>" in the registry editors (Regedit and RegEdt32). To retrieve this unnamed value, define a property and set its PropertyContext qualifier to an empty string. For example, the following class defines properties to hold values for the key specified by the ClassContext qualifier. The default value is stored in the Default property:
[dynamic, provider("RegProv"), ClassContext("localhkey_local_machine\\software\\microsoft\\WBEM\\
cimom\\transports")]
class RegTrans
{
[key] String TransportsDeviceName="";
[PropertyContext("")] String Default;
[PropertyContext("Name")] String Name;
[PropertyContext("Enabled")] String Enabled;
};
The Transports key does not use the unnamed value, so compilation of this MOF file does not produce any value for the Default property unless you use a registry editing tool to change the unnamed value.
To get a description of bitmap files, which is an unnamed value, you need to set the PropertyContext qualifier as follows:
Local|hkey_classes_root\\.bmp