The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



DeleteRegValue


Unit: SDL_filesys
Class: none
Declaration: function DeleteRegValue (RootKey: HKey; SubKey, ValueID: string): boolean;

The function DeleteRegValue deletes a particular Windows registry value. The parameter RootKey defines the root key and can take one of the following values: HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_PERFORMANCE_DATA, HKEY_CURRENT_CONFIG and HKEY_DYN_DATA. The parameter SubKey specifies the key (including its path) used within the branch of the root key. The parameter ValueID specifies the value to be deleted.

The function returns TRUE if the value has been deleted successfully.

Hint: Be careful, this function is potentially dangerous and can cause damage to your installation if applied to a critical value.

Example: The statement
DeleteRegValue (HKEY_CURRENT_USER, '/Software/MyProduct/Customization', 'BgndColor');
deletes the registry value BgndColor in the key HKEY_CURRENT_USER/Software/MyProduct/Customization.



Last Update: 2023-Feb-06