Importing file to delete registry key creates action that deletes the whole branch

  • 7001338
  • 11-Sep-2008
  • 30-Apr-2012

Environment

Novell ZENworks 10 Configuration Management with Support Pack 1 - 10.1 Bundles

Situation

If you import a .reg file that contains the instruction to delete a key (a minus after the open square bracket), the action that is created will delete all keys in that branch.

e.g.,
Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\OptionalComponents\IMAIL]

Will create an action that will delete HKLM\software\microsoft and everything below that.

Resolution

This is fixed in version 10.1.2 - see KB 7001914 "ZENworks 10 Configuration Management 10.1.2" which can be found at https://www.novell.com/support

Workaround 1:
Completely expand the branch for the hive you are updating, ensure you change the setting for each of the higher levels from "Delete", to "None"



Workaround 2:
edit the .reg file before importing, and for each line that deletes a registry key, add a line to "create" the structure above it - e.g., in the example above,
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\OptionalComponents\IMAIL]
would need the following to be placed above it in the file
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\OptionalComponents]