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....



SetRegValue


Unit: SDL_filesys
Class: none
Declaration: procedure SetRegValue (RootKey: HKEY; SubKey, ValueID, Value: string);

The procedure SetRegValue stores a value in the Windows registry. 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 and the parameter ValueID specifies the name under which the Value is to be stored.

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

Example: The statement
SetRegValue (HKEY_CURRENT_USER, '/Software/MyProduct/Customization/BgndColor','00CCB0F8');
stores the hex value 00CCB0F8 under the name BgndColor in the registry key HKEY_CURRENT_USER/Software/MyProduct/Customization.



Last Update: 2023-Feb-06