CreateSubKey(SubKeyName: String): IRegistryKey;
SubKeyName - name of the subkey that must be created.
The CreateSubKey method creates a subkey in the registry, which name is passed by the SubKeyName parameter. If the created subkey already exists, the method returns access to the objects that are contained in it.
Sub Main;
Var
RegKey, SubKey: IRegistryKey;
Begin
RegKey := RegistryClass.CurrentUser;
SubKey := RegKey.CreateSubKey("Software\MyProject");
SubKey.CreateSubKey("Params");
SubKey.CreateSubKey("Fonts");
End Sub Main;
After executing the example the MyProject subkey is created in the registry branch HKEY_CURRENT_USER\Software, and two more subkeys in it, that is, Params and Fonts.
See also: