IBM Support

How can I use Tivoli Endpoint Manager to delete a registry key?

Technote (troubleshooting)


Problem(Abstract)

In order to remove a key, you will need to create a registry file to delete the key and then run regedit using the file. In order to create a file, you will want to use the appendfile action script command

Resolving the problem

In order to remove a key, you will need to create a registry file to delete the key and then run regedit using the file. In order to create a file, you will want to use the appendfile action script command to create the contents of the file to be used in the regedit command. For example, here is an action script that will remove the registry key "testkey" and all subbranches below it:

// clear previously used files
delete __appendfile
delete temp.reg

// create .reg file
appendfile REGEDIT4
appendfile [-HKEY_LOCAL_MACHINE\SOFTWARE\testkey]
move __appendfile temp.reg

// run .reg file
wait regedit -s temp.reg

Note: the registry key "testkey" and all of its sub-branches will be removed with this actioscript.

Also Note: depending on if you are taking action on a 32 bit or 64 bit machine you may need to add the following line to the top of the registry redirection at the top of your action script

When taking action on a:
32 bit machine; and when modifying the registry
64 bit machine; and when modifying the 64 bit part of the registry

Add the following to the first line of the Action Script:

action uses wow64 redirection false

When taking action on a:
64 bit machine; and when modifying the 32 bit part of the registry

Add the following to the first line of the Action Script:

action uses wow64 redirection true

For example, in order to modify the 32 bit part of the registry on a 64 bit machine, the actionscript would appear as follows:

action uses wow64 redirection true

// clear previously used files
delete __appendfile
delete temp.reg

// create .reg file
appendfile REGEDIT4
appendfile [-HKEY_LOCAL_MACHINE\SOFTWARE\testkey]
move __appendfile temp.reg

// run .reg file
wait regedit -s temp.reg

For more information, see https://www.ibm.com/developerworks/mydeveloperworks/wikis/home?lang=en#/wiki/Tivoli%20Endpoint%20Manager/page/BigFix%20Actions.

Historical Number

349

Document information

More support for: IBM BigFix family

Software version: Version Independent

Operating system(s): Platform Independent

Reference #: 1506061

Modified date: 06 September 2011


Translate this page: