def SetRegistryDefaultValue(subKey, value, rootkey=None):
 if (rootkey is None):
  rootkey = GetRootKey()
 if (type(value) == str):
  typeId = win32con.REG_SZ
 elif (type(value) == int):
  typeId = win32con.REG_DWORD
 else:
  raise TypeError(('Value must be string or integer - was passed ' + repr(value)))
 win32api.RegSetValue(rootkey, subKey, typeId, value)

def SetRegistryDefaultValue ( subKey , value , rootkey = None ) : if ( rootkey is None ) : rootkey = GetRootKey ( ) if ( type ( value ) == str ) : typeId = win32con . REG_SZ elif ( type ( value ) == int ) : typeId = win32con . REG_DWORD else : raise TypeError ( ( 'Value must be string or integer - was passed ' + repr ( value ) ) ) win32api . RegSetValue ( rootkey , subKey , typeId , value )
a helper to set the default value for a key in the registry .