Jump to content

How to delete registry keys with ADM-templates


Recommended Posts

Posted

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?


Posted

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?

Posted
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.

Posted

Consider using GPO's to change permissions on the keys you want to delete, and then you can reg delete them via a logon script.

  • 4 weeks later...
Posted

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

  • 1 year later...
  • 3 weeks later...
Posted (edited)

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

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