registry question (_winreg)

idjhh idjhh at hanmail.net
Sat Sep 14 23:52:50 EDT 2002


hi ^^
i write this code today , but it is not running -_-;
i don`w find error position
see my code and then please advise me ^^
purpose of this program is to show window startprogram list ^^


=================================================================
import _winreg
root_key=_winreg.HKEY_LOCAL_MACHINE
sub_key=_winreg.OpenKey(root_key,"Software\\Microsoft\\Windows\\CurrentVersion\\Run")
number_value=_winreg.QueryInfoKey(sub_key)[1]
i=1
reg_name_list=[]
reg_data_list=[]
while i <= number_value :
    value_name=_winreg.EnumValue(sub_key,i)[0]
    value_data=_winreg.EnumValue(sub_key,i)[1]
    reg_name_list.append(value_name)
    reg_data_list.append(value_data)
    i=i+1

_winreg.CloseKey(sub_key)

==================================================================



More information about the Python-list mailing list