Binary Register entries Question

Matthias Janes matthias_j at lycos.com
Sun Mar 10 13:39:28 EST 2002


I exported a Win NT register to a reg file like this.

[HKEY_CURRENT_USER\Software\TEST]
"Password"=hex:b3,e8,85,f6,4d,9c,29,04

Now I'm not sure how to write binary Hex data with python.

----------------------------------------------------------
I do something like this

import os, sys, win32api, win32con

parentkey = win32con.HKEY_CURRENT_USER
subkey = r"Software"
Computer = None

values = ...... I do not know how to use this for binary hex data

b = win32api.RegConnectRegistry(Computer, parentkey )
c =win32api.RegCreateKey (b, subkey)
v = win32api.RegSetValueEx (c, "Password", 0,win32con.REG_BINARY, values)

----------------------------------------------------------



Any Help would be greate

Matthias Janes



More information about the Python-list mailing list