programmatically detect the position of wireless on/off switch?

Posted on 2011-05-06
Last Modified: 2012-08-13
My laptop has a sliding switch on the front which switches on/off the wireless internet. Is there a way to programmatically detect the position of this switch?

I suspect there is, but I don't know where in the OS to find it. If the switch accidentally gets slid to the off position the internet stops working. Right-clicking on the wireless symbol in the system tray and selecting "Repair" gives a message to check that switch, so there must be some way of determining when the wireless has been turned off by that switch.

I'd like to write a simple program that pops up a message if that switch gets slid to the off position.
Question by:deleyd
    LVL 11

    Accepted Solution

    I'm inclined to say "No", because the switch is too low a level on the stack for O/S to detect, unless it has a specific hook into BIOS to query its status.  I suspect the message about checking is a vendor-specific add-on for wireless management (I know Dell does that), and it actually doesn't truly know the switch position.  It's just a general warning when wireless isn't working.
    LVL 6

    Assisted Solution

    I am inclined to agree with "techhealth".  The switch effectively "disables" the hardware by powering off the transmitter without disabling the hardware and hardware driver, so WMI queries will not report an issue.  Maybe the hardware vendor can give you a specific WMI class to check against or a utility that does something like it.  

    Workaround:  You might get a script/utility that reports the availability of wireless networks.  If the list is empty, then you switch must be off.


    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Suggested Solutions

    For some time some of our users experienced package loss on a couple of our Lenovo Thinkpad S531 machines running Windows 8 or Windows 8.1 64-bit OS. I was not able to find many answers online, but did after some investigation I began to suspect Blu…
    This subject  of securing wireless devices conjures up visions of your PC or mobile phone connecting to the Internet through some hotspot at Starbucks. But it is so much more than that. Let’s look at the facts: devices#sthash.eoFY7dic.
    This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.
    Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now