How to get the owner name of a registry key?

Steven Young 261 Reputation points
2021-04-09T02:35:53.087+00:00

I want to get the owner name of a registry key, for example, return "TrustedInstaller" or "Administrator" etc. I have the setacl.exe, but it doesn't seem to have that function.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,574 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. S.Sengupta 14,811 Reputation points MVP
    2021-04-09T02:47:09.86+00:00
    0 comments No comments

  2. Steven Young 261 Reputation points
    2021-04-09T05:15:39.777+00:00

    Thank you, but that didn’t solve my problem, I just want to get the owner's name of a registry key but not set it.

    0 comments No comments

  3. Castorix31 81,461 Reputation points
    2021-04-09T06:09:26.54+00:00

    You can use PowerShell

    A quick test with a key HKEY_CURRENT_USER\Identities:

    $acl = Get-Acl HKCU:\Identities
    $owner = $acl.Owner
    echo $owner 
    
    0 comments No comments