I've got a command that I use, it's something like:
netsh wlan connect ssid=wifi_ssid
But now I have a problem. The Wifi on my laptop is gone.
So I've got a USB Wifi dongle. My command doesn't work anymore as it says I need to specify the wifi adapter or something.
I think I can work out how to make it work again.
But I thought I'd try asking here first to find out the 'proper' fool proof way of doing it.
ALSO... I want to have some code that:
- Disconnects from a named Wifi network
- Make it never auto connect to that Wifi network - but keep it in the profile with password still stored
Thanks.
What's the command for connecting/disconnecting to Wifi?
Moderator: DosItHelp
Re: What's the command for connecting/disconnecting to Wifi?
Profile name is mandatory for connect, while ssid and interface are optional.
Code: Select all
netsh wlan connect name="YourProfileName"
Disconnect by interface name.C:\>netsh wlan connect /?
Usage: connect [name=]<string> [[ssid=]<string>] [[interface=]<string>]
Parameters:
Tag Value
ssid - SSID of the wireless network.
name - Name of the profile to be used in connection attempt.
interface - Name of the interface from which connection is attempted.
Code: Select all
netsh wlan disconnect interface="Your Adapter Name"
C:\>netsh wlan disconnect /?
Usage: disconnect [[interface=]<string>]
Parameters:
Tag Value
interface - Name of the interface from which disconnection is attempted.