• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 728
  • Last Modified:

programmatically detect the position of wireless on/off switch?

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.
0
deleyd
Asked:
deleyd
2 Solutions
 
techhealthCommented:
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.
0
 
Lee_YCPCommented:
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.

0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now