Deleting Subkeys and Entries

Microsoft® Windows® 2000 Scripting Guide

microsoft windows 2000 scripting guide

« Previous | Next »   

For the most part, you should be very careful about deleting anything from the registry. Despite that caution, however, there will likely be times when you must delete registry subkeys or entries. For example, you might discover, after adding an entry to modify the behavior of a system component, that the component is not working. Should that happen, you will likely want to revert to your previous configuration, which means removing the newly added registry entry. Another possibility is that you read a Knowledge Base article that describes a security issue whose temporary fix involves the deletion of a certain subkey.

The Registry Provider provides two methods for deleting elements of the registry: DeleteValue and DeleteKey. The DeleteValue method takes three parameters:

  • A constant representing the subtree where the entry being deleted is located.
  • The path to the subkey that contains the entry.
  • The name of the entry.

The DeleteKey method accepts two parameters: a constant representing the subtree where the subkey being deleted is located and the path of the subkey to be deleted.


send us your feedback Send us your feedback « Previous | Next »   


Microsoft Windows 2000 Scripting Guide(c) Automating System Administration 2003
Microsoft Windows 2000 Scripting Guide(c) Automating System Administration 2003
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 635

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net