function RegWriteDWordValue(const RootKey: Integer; const SubKeyName, ValueName: String; const Data: Cardinal): Boolean;
Writes the specified REG_DWORD-type registry value. Returns True if successful, False otherwise.
begin RegWriteDWordValue(HKEY_AUTO, 'Software\My Company\My Program', 'ShowToolbar', 1); end;