Pascal Scripting: RegWriteStringValue

Prototype:

function RegWriteStringValue(const RootKey: Integer; const SubKeyName, ValueName, Data: String): Boolean;

Description:

Writes the specified REG_SZ-type registry value. Returns True if successful, False otherwise.

Remarks:

If the value already exists and is of type REG_EXPAND_SZ, the new value will also be of type REG_EXPAND_SZ. Otherwise, a REG_SZ-type value will be created.

Example:
begin
  RegWriteStringValue(HKEY_AUTO, 'Software\My Company\My Program',
    'Language', ExpandConstant('{language}'));
end;