I'm looking for a way to obtain the ACL for a specific registry key. For example if I want the permissions of
HKLM\SOFTWARE\Microsoft
I would get something like
Administrators Full Control
Creator Owner Special Permissions (List of special permissions here)
Power Users Read
Special Permissions (List of special permissions here)
SYSTEM Full Control
Users Read
In general terms what I want is something that would return a structure similar to the following for file ACLs
Set wmiSecuritySettings = wmiServices.Get ("Win32_LogicalFileSecuritySetting.Path='" & fname & "'")
intRetVal = wmiSecuritySettings.GetSecurityDescriptor(wmiSecurityDescriptor)
Any suggestions other than using the ADsSecurity.DLL (which is not shipped with WinXP). I cannot install any SW on the box where this will be running.
> I'm looking for a way to obtain the ACL for a specific registry key. For
> example if I want the permissions of
> HKLM\SOFTWARE\Microsoft
> I would get something like
> Administrators Full Control
[quoted text clipped - 17 lines]
> with WinXP).
> I cannot install any SW on the box where this will be running.
GetNamedSecurityInfo or GetSecurityInfo
PS : Please don't post in HTML in newsgroups.
Arnaud
MVP - VC
Jose Cintron - 19 Feb 2007 22:14 GMT
Ok this is what I have so far...
void main(void)
{
DWORD result;
PSECURITY_DESCRIPTOR pSD = NULL;
PACL pACL = NULL;
result = GetNamedSecurityInfo(TEXT("CLASSES_ROOT\\arzfile"),
SE_REGISTRY_KEY, \
DACL_SECURITY_INFORMATION, NULL, NULL, &pACL, NULL,
&pSD);
}
How do I interpret the values returned in pACL and pSD?
>> I'm looking for a way to obtain the ACL for a specific registry key. For
>> example if I want the permissions of
[quoted text clipped - 28 lines]
> Arnaud
> MVP - VC