This library provides functions for the computers wifi
from PyNetsh.WLAN import *
-
addProfile(strPath):
adds a profile to the saved configurations. Configuration has to be an exported .xml file
strPath: the path to the config-file (*.xml)
returns nothing -
connectTo(strProfile)
tries to establish a WLAN-Connection to the specified Profile
strProfile: a string with the profile's name
returns nothing -
deleteProfile(strProfile): This function permanently deletes a profile strProfile: a string with the profile's name
returns nothing -
disconnect()
shuts down the WLAN-Connection
returns nothing -
exportProfile(strProfile, strPath, clearKey=True)
exports a profile to a xml-file
strProfile: a string with the profile's name
strPath: the path to the folder to which the file will be saved
clearKey: [Optional] if true, sets the "key=clear" property
returns nothing -
getAvilableNetworksJSON()
Scans for available networks
returns a list of JSON-encoded strings -
getAvilableNetworksList()
Scans for available networks
returns a list of strings containing the names -
getDriverReport():
gets all the information available for installed drivers
returns a string containing the informations -
getProfileConfiguration(strProfile)
Reads the configuration of the specified Profile
strProfile: a string with the profile's name
returns a JSON-encoded string -
getProfileConfigurations()
Reads the configurations of all wifis saved on the computer
returns a list of JSON-encoded strings -
getProfilesJSON()
Reads the names of the saved profiles on this computer
returns a JSON-string containing the profiles -
getProfilesList()
Reads the names of the saved profiles on this computer
returns a list of strings containing the profiles -
setConnectionMode(strProfile, setToAuto=True)
updates the connection mode of the specified profile
strProfile: a string with the profile's name
setToAuto: [Optional] if true, sets the profiles connection mode to auto. Else to manual
returns nothing