Command to disable wireless?

S

Stan Brown

Is there any kind of command-lie command or shortcut to enable and
disable wireless? The key combination on my Dell Inspiron is Fn-F2,
but there's no combination on my external illuminated keyboard.

It's Win 7 Home Premium, if that matters.
 
S

Stan Brown

Here's one solution, (not sure if it's for Win 7), and where there's
one, there may be more, so I'd say it's definitely possible.

<http://wlanbook.com/enable-disable-wireless-card-command-line/>
Thanks, Char. I should have done a Web search first on my own.

I did look at devcon, but according to this article it doesn't work
on 64-bit Windows; you have to download a 620 MB file and extract the
devcon from that.
http://superuser.com/questions/104400/enable-disable-wireless-
interface-in-a-bat-file

But you got me started. I'll keep looking, which I should have done
before I posted.

....

And I have the answer.

To disable:
netsh interface set interface "Wireless Network Connection" disabled

To enable:
netsh interface set interface "Wireless Network Connection" enabled

You must do this within a command prompt with administrative
privilege. And of course you need to use the correct interface name,
which you can find from:
netsh interface show interface


Basic instructions are here:
http://sudonetworks.com/wiki/index.php?
title=Windows_Wireless_Control_with_netsh

The first time I ran the disable command, I got the error message "An
interface with this name is not registered with the router." I found
the explanation (elevated privilege required) here:

http://computerhelpforums.net/topic/278-an-interface-with-this-name-
is-not-registered-with-the-router/

You'd think the error message could have said that, but "oh well!"

Note to self: Do a net search before asking questions in future. (I
guess I just subconsciously assumed no one before me had ever wanted
to do this, which is a pretty silly assumption.)
 
C

Char Jackson

Is there any kind of command-lie command or shortcut to enable and
disable wireless? The key combination on my Dell Inspiron is Fn-F2,
but there's no combination on my external illuminated keyboard.

It's Win 7 Home Premium, if that matters.
I like this solution better than what I posted earlier. Nothing to
download, it's all built in. Make two batch files if you like, or make
a single batch file that checks the current status and toggles it.
Create a shortcut, place it where it's convenient, and Bob's your
uncle.

<http://answers.microsoft.com/en-us/...and-line/17a21634-c5dd-4038-bc0a-d739209f5081>
 
C

Char Jackson

Thanks, Char. I should have done a Web search first on my own.

I did look at devcon, but according to this article it doesn't work
on 64-bit Windows; you have to download a 620 MB file and extract the
devcon from that.
http://superuser.com/questions/104400/enable-disable-wireless-
interface-in-a-bat-file

But you got me started. I'll keep looking, which I should have done
before I posted.

...

And I have the answer.

To disable:
netsh interface set interface "Wireless Network Connection" disabled

To enable:
netsh interface set interface "Wireless Network Connection" enabled

You must do this within a command prompt with administrative
privilege. And of course you need to use the correct interface name,
which you can find from:
netsh interface show interface


Basic instructions are here:
http://sudonetworks.com/wiki/index.php?
title=Windows_Wireless_Control_with_netsh

The first time I ran the disable command, I got the error message "An
interface with this name is not registered with the router." I found
the explanation (elevated privilege required) here:

http://computerhelpforums.net/topic/278-an-interface-with-this-name-
is-not-registered-with-the-router/

You'd think the error message could have said that, but "oh well!"

Note to self: Do a net search before asking questions in future. (I
guess I just subconsciously assumed no one before me had ever wanted
to do this, which is a pretty silly assumption.)
There you go then. :)

I just posted another netsh-based solution before I saw your post.
Feel free to ignore it if you like.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top