DeleteRegKey
Declaration: |
DeleteRegKey (RootKey: TRegRootKey; SubKey: string): boolean; |
The function DeleteRegKey deletes a Windows registry key with all its values and subkeys. The parameter RootKey defines the root key and the parameter SubKey specifies the key (including its path) used within the branch of the root key.
The function returns TRUE if the key has been deleted successfully.
|
Warning: |
Be careful, this function is potentially dangerous and might completely destroy your installation if applied to a critical key. |
Example: |
The statement DeleteRegKey (hkeyCurrentUser, '/Software/MyProduct/Customization'); deletes the registry key HKEY_CURRENT_USER/Software/MyProduct/Customization and all ist values and subkeys. |
|