Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Enable/disable wireless interface in a bat file

I need to create a hotkey that essentially instantly turns off my wireless radio card (whatever it is called), and either reconnects automatically, after a set amount of time, when pressed again OR when I press a different key.

When I press F12, will dissconnect me from the internet, then when I press F11 (or F12) it will reconnect.

After a little research I have come up with ways such as WinX, which opens Mobility centre, but that is not automatic as I still have to press "Turn Wireless Off", I am looking for a key that simply turns it on and off, as found on a lot of laptops.

Some code I found included:

SetTitleMatchMode, 2
 Run %windir%\system32\mblctr.exe /open
 WinWait, Windows Mobility Center
 Sleep, 300
 Send, !t
 Sleep, 1000
 WinClose, A

But this includes Mobility Centre again.

share|improve this question

marked as duplicate by Karan, Dennis, 8088, Simon Sheehan, Canadian Luke Jan 24 '13 at 23:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Am I assuming correctly that the real problem is that you're having troubles connecting to a certain WiFi and need to restart your wireless adapter for it to work? – slhck Jan 22 '13 at 10:07
Maybe this question could be of help to you: Enable/disable wireless interface in a bat file – pzkpfw Jan 22 '13 at 10:26
MM i need some sort of hotkey to toggle it, not to do it through the command line, it has to be in rapid sucsession while i have a full screan program open. – user191844 Jan 22 '13 at 11:52
@slhck i am not having problems connecting to a cirtain wifi, i am trying to toggle it while in a full screan program on a server to connect and kind of "half disconnect", when i lose connection it waits 30 seconds before kicking me, if i can turn it off then on in under 30 seconds (with a hotkey), i will be able to acheive what i want to do. – user191844 Jan 22 '13 at 12:00

Solved it.

netsh interface set interface name="Wireless Network Connection" admin = disabled  
netsh interface set interface name="Wireless Network Connection" admin = enabled  

The first line disables it, the second enables it! Thanks for the comments.

share|improve this answer
Please note, that the name 'Wireless Network Connection' may be different for different languages. So in german it is something like 'Drahtlosnetzwerkverbindung' or 'Drahtlosnetzwerkverbindung 2' ... – Lonzak Nov 28 '14 at 9:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.