Discussion Locked

Remove a registry key

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi there!!
I am trying to remove a key into the registry by using a script. I have already got using a user with admin privileges, but when I try to remove using a normal user it fails.

To remove with admin user I am using a resource kit application (reg.exe).

Anyone has a hint?

Best regards

Leandro

6 replies

by p. dickason, cne, mcse, cca

looks like a permission issue. Depending on the key, members of the users group can't normally delete them. Are you sure this is something you want to do? What you will need to do is edit the registry using regedt32.exe. Then you will need to select the key in question and then select Permissions under Security on the toolbar. There you can add permissions to users or groups to do certain things to that key. Thats how you do it although I don't recommend it. Hope this helps
Pete

by oz_media

P. Dickason has it pegged. Don't forget to export and save the registry first so that it can be replaced if broken!

by leandro.guimaraes

I am sure that I need to delete these keys. It will help me to deploy a tool to many clients. My problem is in permission issue, tha I can?t get it done in script mode.

Best regards

Leandro

by juergen hartl

As mentioned above it is a permission issue.
A script run under User rights can not access registry entries that require Admin rights!
Maybe you could run the script via the RunAs command. At a command prompt type RunAs to see help about it.

This discussion is closed to new replies.