def set_value(self, label, value, type=None):
        def _guess_type(value):
            try:
                int(value)
            except (ValueError, TypeError):
                pass
            else:
                return REGISTRY_VALUE_TYPE.REG_DWORD
            if isinstance(value, list):
                return REGISTRY_VALUE_TYPE.REG_MULTI_SZ
            value = unicode(value)
            if "%" in value and value.count("%") % 2 == 0:
                return REGISTRY_VALUE_TYPE.REG_EXPAND_SZ
            return REGISTRY_VALUE_TYPE.REG_SZ

        type = REGISTRY_VALUE_TYPE.constant(type)
        if type is None:
            try:
                _, type = wrapped(win32api.RegQueryValueEx, self.pyobject(), label)
            except exc.x_not_found:
                type = _guess_type(value)
        wrapped(win32api.RegSetValueEx, self.pyobject(), label, 0, type, value)
Attempt to set one of the key's named values. If type is
dataset/ETHPy150Open tjguk/winsys/winsys/registry.py/Registry.set_value