Occasionally, I have a laptop that connects to the network via Wi-Fi when on the go, although usually it's hardwired.
Occasionally, I'll forget to re-enable Airplane Mode when I'm done using Wi-Fi, only to realize later when I see a "network icon" in the taskbar as opposed to an Airplane Mode indicator.
Is there any way, perhaps via a script, I can have Windows automatically go into Airplane mode if an Ethernet connection is detected?
I'm guessing it's impossible to just "watch for this", but it would be acceptable if this was something that happened whenever the computer was unlocked (which can be done via Task Manager). A login or startup script would not work, because the laptop is usually hibernated between sessions.
Also, doing the reverse (disabling Airplane mode when no Ethernet connection is detected) would be nice.
I know how to use Task Scheduler to set up a script to do this. But how can one programatically disable or enable Airplane Mode from a batch file, and detect if an Ethernet connection is present?