Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to delete a key from a command line. So I wanted to use reg delete "the key to be deleted" /f but I get ERROR: access is denied.

From the same login session (the same user) I am able to delete the key without any troubles from regedit.exe that is not run as administrator.

I cannot use runas command to execute reg that I believe would be to solution because in fact I want to use reg to delete registry entry for administrator profile so runas works again. More info in my other question Windows7 corrupted profile - prevention exists?

share|improve this question
    
Regedit.exe always runs as administrator. How'd you manage to run it without it? Why isn't deleting it with Regedit enough to solve your Runas problem? –  Ƭᴇcʜιᴇ007 Oct 18 '12 at 23:12
    
I need to delete the key from command line. –  Radek Oct 18 '12 at 23:15

1 Answer 1

Administrative commands need to run from an elevated command prompt. Standard command prompts in Windows Vista and newer don't run with administrator rights even if the user is an administrator.

share|improve this answer

Your Answer

 
discard

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.