function RegWriteBinaryValue(const RootKey: Integer; const SubKeyName, ValueName: String; const Data: AnsiString): Boolean;
Writes the specified REG_BINARY-type registry value. Returns True if successful, False otherwise.
begin RegWriteBinaryValue(HKEY_AUTO, 'Software\My Company\My Program', 'BinaryTest', 'Whatever' + #1#2#3#4); end;