📎 AI Summary:
The thread discusses methods to enable or disable wireless network connections in Windows 7, with initial posts providing command-line scripts and shortcuts for toggling the NIC via WMIC and netsh commands. The original poster had lost a previous VB script for this purpose but appreciated the simpler command-line solutions shared. Later posts shift focus to a hardware issue with a laptop's touch sensor for controlling WLAN and Bluetooth, with suggestions limited due to hardware constraints and uncertainty about alternate key functions. Overall, the conversation revolves around software solutions for network toggling and troubleshooting hardware-related toggling issues.

MrLH

Senior Member
Joined
Mar 5, 2013
Messages
19
Thread Author #1
I had this wonderful script that I got from someplace (can't recall) that enabled or disabled lan connections in windows xp. I used it to turn the wireless card on/off as the card made clicking noises during recording/playback of music files. I have just performed a clean install of windows 7 and am migrating backed up files and programs but can't find the script anywhere in my backup. Does anyone know of such a script and can it be used in windows 7? I'd hate to have to hop through several screens everytime I want to turn it off/on and think there must be a simpler way to get it done. Any ideas or places to direct my attention to?
 

Solution
Can also use

netsh interface set interface "Wireless Network Connection" enabled
netsh interface set interface "Wireless Network Connection" disabled

Don't forget to replace the name of "Wireless Network Connection" with the name of your connection as found in Network Connections.

Mike

Windows Forum Admin
Staff member
Premium Supporter
Joined
Jul 22, 2005
Messages
9,260
Start elevated Command Prompt.

Get NIC list and index number:
wmic nic get name, index

Enable NIC with index number: (eg: 7)
wmic path win32_networkadapter where index=7 call enable

Disable NIC with index number: (eg: 7)
wmic path win32_networkadapter where index=7 call disable

Result:
wmic path win32_networkadapter where NetConnectionID="Wireless Network Connection" call disable
wmic path win32_networkadapter where NetConnectionID="Wireless Network Connection" call enable

Create two shortcuts, run as elevated.
A further answer about this can be found here: http://answers.microsoft.com/en-us/...and-line/17a21634-c5dd-4038-bc0a-d739209f5081
 

Josephur

Windows Forum Admin
Staff member
Premium Supporter
Microsoft Certified Professional
Joined
Aug 3, 2010
Messages
1,283
Can also use

netsh interface set interface "Wireless Network Connection" enabled
netsh interface set interface "Wireless Network Connection" disabled

Don't forget to replace the name of "Wireless Network Connection" with the name of your connection as found in Network Connections.
 

Solution

MrLH

Senior Member
Joined
Mar 5, 2013
Messages
19
Thread Author #4
Thanks guys, sorry it took so long to get back to you but have been extremely busy. I have been able to get it done and both suggestions work fine. These are incredibly easy to employ, the script I had was a VB script and had lots of lines, stuff I could never remember if my life depended on it but it worked as a stand alone item. I don't mind a turn on icon and a turn off icon though, it gets the job done. Thanks again!
 

Uche

New Member
Joined
Sep 25, 2013
Messages
3
Here i face a different challenge still with wlan.
My wlan and Bluetooth swiches are powered by a touch sensor.
The Flex cable connecting this touch panel went bad so i cannot turn on the wlan and Btooth hardware.

How can i work around this till i replace the flex cable.
 

Josephur

Windows Forum Admin
Staff member
Premium Supporter
Microsoft Certified Professional
Joined
Aug 3, 2010
Messages
1,283
Chances are you will not be able to do this, unless your BIOS supports disabling this switch all together somehow. What model of laptop (I'm assuming) uses a touch sensor for turning radio on/off ??
 

Josephur

Windows Forum Admin
Staff member
Premium Supporter
Microsoft Certified Professional
Joined
Aug 3, 2010
Messages
1,283
Is there a Function-F8 key combo that might work?