Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

I have windows 7 x86, I am the only user and Administrator of my pc. I want to be able to take ownership of the key(below) but subinacl will not allow it.


The error is: RegSetKeySecurity Error: 5 Access is denied.

I've tried to launch it with an elevated command line and it still says error 5.

Two question: Why is it doing this? How to take ownership of this key? I would like to use subinacl if possible. But I am open minded to other tools as long as they can be used from the command line.

share|improve this question
Why do you need to take ownership of that key? – user3463 Jul 14 '12 at 0:30
@Randolph West I want to delete every subkey within it but it won't let me. Besides, I want to know why it doesn't work. It works if set the permissions manually from regedit. – Alexander Ceed Jul 14 '12 at 0:36
@AlexanderCeed, did you run subinacl from an admin command-prompt? – Synetech Jul 14 '12 at 0:50
@Synetech Yes. I right click on cmd.exe and select "Run as admin" – Alexander Ceed Jul 14 '12 at 1:09

You have to take ownership of the registry key before you can change its permissions (you should set the ownership back afterwards).

Hmm, I could have sworn you can use the takeown command to take ownership of a registry key, but it looks like you can’t.

Instead, depending on the version of Windows you use you can use the cacls command, icacls, or xcalcs (update with a VB script), or even a third-party tool like RegDACL.

(cacls and icacls come with Windows 7)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .