Jump to content

How to delete registry keys with ADM-templates


T22

Recommended Posts

We are currently implementing an AD and I´m looking at the group policies.

I have made an ADM-template file that gives us a some extra policies which works fine.

My problem is that I want the some policies to delete registry keys and registry values and I don´t know how to this.

Does anyone on this forum know how to make a ADM-template that can do this?

Link to comment
Share on other sites


An adm file is a registry file. You can not delete parts of the registry with a registry file, only edit its contents.

What parts of the registry are you trying to delete?

Have you explored the "reg delete" command and run that as a logon script?

Link to comment
Share on other sites

An adm file is a registry file. You can not delete parts of the registry with a registry file, only edit its contents.

What parts of the registry are you trying to delete?

Have you explored the "reg delete" command and run that as a logon script?

Thanks, chilifrei64

We have used scripts and NT4 policies for all kinds of registry settings earlier.

Some of the registry keys I want to delete is in the HKLM and therefore I can't run them in a logon script.

I did hope that when I did put the computer in the right OU it would automaticly configure itself with the registry changes I need.

The back-up plan is to make a script that resides on the DC:s and let a machine policy run it.

Link to comment
Share on other sites

  • 4 weeks later...

To delete a registry value with an ADM template don't enter any valueON or ValueOff, then when enabling the item it will add a registry value DWORD 1 and disabling will delete the registry value. Deleting registry keys is a lot more difficult, I'm trying to find this out myself.

Oh yeah, you can delete registy keys and values with a registry file by doing the following :-

To remove a key from the registry using a reg file, just add a minus sign before the key name:

REGEDIT4

[-HKEY_CURRENT_USER\DummyTree]

This will remove the entire tree "DummyTree".

To remove an individual item from the registry, place the minus sign after the equal sign:

REGEDIT4

[HKEY_CURRENT_USER\DummyTree]

"ValueToBeRemoved"=-

:thumbup

Link to comment
Share on other sites

  • 1 year later...
  • 3 weeks later...

The registry hive and parameters deletion is easily made with desktop management software. At least it is the quickest and painless method to do that corporate-wide I know of. We have Scriptlogic's Desktop Authority tool rolled up in our environment and perform registry operations on client machines frequently. Sometimes you need to set some registry parameter to run specific software on user computer of specified user. Sometimes you need to delete key that was left by imporperly uninstalled software remotely. What's the usual, you need to change the key based on information taken from existing situation. For example, if some key exists within HKLM root create another key and set needed priviledges on that key. If not, new key shouldn't be applied because otherewise it say can lead user application to crash. That all we do through the Desktop Authority. I recommend you to try it and make your decisions.

Edited by GrahamN
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...