Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Simple question, but how do you do it?

I've tried:

takeown /f //HKEY_LOCAL_MACHINE/MyKey/ \R \A

As expected, this fails to find anything because it looks like a network address.

Any ideas? It's part of my investigation into this question.

share|improve this question
up vote 2 down vote accepted

I believe takeown.exe for taking ownership of a file, not for Registry keys.

C:\Users\Sathya>takeown /?

TAKEOWN [/S system [/U username [/P [password]]]]
        /F filename [/A] [/R [/D prompt]]

Description: This tool allows an administrator to recover access to a file that was denied by re-assigning file ownership.

By executing

takeown /f //HKEY_LOCAL_MACHINE/MyKey/ \R \A

You're saying take ownership of file located at network location HKEY_LOCAL_MACHINE with share name of MyKey, which is not the way registry keys are stored.

Also, \R and \A should be specified with forward slashes, not backslashes, ie, /R /A

To take ownership of registry key,

Open Registry Editor.

Click the key you want to take ownership of.

On the Edit menu, click Permissions.

Click Advanced, and then click the Owner tab.

Under Change owner to, click the new owner, and then click OK.

To do so via an external program you'll need an App like RegDACL

What is RegDACL good for? RegDACL allows you to query and change the discretionary access control list (DACL) of any Windows NT Registry key. You can of course use the program RegEdt32 to set registry permissions, but if you need to edit more than a few machines then you are faced with quite a boring job, not to mention being more prone to make mistakes. RegDACL gives you the ability to use a batch script to perform this job. The freeware versions of RegDACL allow you to define access permissions for the predefined groups

share|improve this answer
Thanks for summing it all up nicely - I had already ended up using RegDACL to answer my own other question, great tool. Doing it from Regedit didn't work! – Josh Comley Nov 22 '09 at 15:40
Ah, glad to know you've gotten your problem solved. – Sathya Nov 22 '09 at 15:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.