Writing to REG_MULTI_SZ windows registry keys
Mark Hammond
mhammond at skippinet.com.au
Fri Feb 6 18:21:33 EST 2004
Pat Blair wrote:
> Hello. I'm looking for any information I can get about writing values
> to keys in the Windows registry when the value type is a multi-string
> (ie. REG_MULTI_SZ). When I get the value of a multi-string value using
> winreg functions, I get a tuple with tuple[0] being a list, and tuple[1]
> a number.
This function will be documented as returning a tuple of (data,
data_type). Hence, tuple[0] is your data, which itself is a list.
> If I try to write such a tuple back into a multi-string
> value, I get the following exception:
You pass the type you want to set as one param, and the data as another.
Try just passing tuple[0] back into the function (but obviously
specifying REG_MULTI_SZ as the type)
Mark.
More information about the Python-list
mailing list