The information in this article applies to:
SUMMARY
To take ownership of a registry key it is necessary to have a handle to the
key. A handle to the key can be obtained by opening the key with a registry
API (application programming interface) such as RegOpenKeyEx(). If the user
does not have access to the registry key, the open operation will fail and
this will in turn prevent ownership being taken (because a handle to the
key is required to change the key[ASCII 146]s security).
This function call will provide a handle to the registry, which can be used
in the following call to take ownership:
Please note that you will need to initialize the security descriptor being
passed to RegSetKeySecurity() and set the owner field to the new owner SID.
Taking ownership of a registry key is not a common operation. It is typically an operation that an administrator would use as a last resort to gain access to a registry key. Additional query words:
Keywords : kbAPI kbKernBase kbWinOS2000 kbRegistry kbSecurity kbDSupport kbGrpKernBase |
Last Reviewed: January 5, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |