win32api.RegSetKeySecurity
RegSetKeySecurity(key, security_info, sd)
Sets the security on the specified registry key.
Parameters
key : PyHKEY/int
Handle to an open key for which the security descriptor is set.security_info : int
Specifies the components of the security descriptor to set. The value can
be a combination of the *_SECURITY_INFORMATION constants.sd : PySECURITY_DESCRIPTOR
The new security descriptor for the keyComments
If key is one of the predefined keys, the predefined key should be closed with win32api::RegCloseKey.
That ensures that the new security information is in effect the next time the predefined key is referenced.
Win32 API References
Search for PyRegSetKeySecurity at msdn, google or google groups.