1

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?

2
  • What are you trying to avoid by disabling Wi-Fi when Ethernet is connected? If you're only doing it because Ethernet isn't getting used when Wi-Fi is connected, then your problem may be better fixed by fixing your interface priorities, rather than bothering with toggling Wi-Fi on and off all the time.
    – Spiff
    Commented Oct 31, 2019 at 0:27
  • @Spiff That's not the issue. I want all the radios disabled when an Ethernet connection is present, and only enabled when that is not the case, exactly as I outlined. Commented Oct 31, 2019 at 0:49

0

You must log in to answer this question.

Browse other questions tagged .