def _npcap_set(self, key, val):
        """Internal function. Set a [key] parameter to [value]"""
        res, code = _exec_cmd(_encapsulate_admin(
            " ".join([_WlanHelper, self.guid[1:-1], key, val])
        ))
        _windows_title()  # Reset title of the window
        if code != 0:
            raise OSError(res.decode("utf8", errors="ignore"))
        return (code == 0)
Internal function. Set a [key] parameter to [value]