Inherit WifiUtil class from _wifiutil_win and add the following code in your subclass.
def remove_network_profile(self, obj, name):
"""Remove the specified AP settings."""
profile_name_list = super().network_profile_name_list(obj)
for profile_name in profile_name_list:
if name == profile_name:
super()._logger.debug("delete profile: %s", profile_name)
str_buf = create_unicode_buffer(profile_name)
ret = super()._wlan_delete_profile(super()._handle, obj['guid'], str_buf)
super()._logger.debug("delete result %d", ret)
else:
pass
And then,use the method remove_network_profile(iface._raw_obj,profile.ssid) to remove the profile.
The iface is a interface object.
Inherit WifiUtil class from _wifiutil_win and add the following code in your subclass.
def remove_network_profile(self, obj, name): """Remove the specified AP settings."""
And then,use the method remove_network_profile(iface._raw_obj,profile.ssid) to remove the profile. The iface is a interface object.