auto disabling of wifi when ethernet connected

Page 2 of 3 FirstFirst 123 LastLast

  1. Posts : 7,457
    Windows 10 Home 20H2
       #11

    dalchina said:
    The most straightforward event is in the Applications and Services Logs/Microsoft/Windows/NetworkProfile log. There is a EventId 4004 "Network State Change Event" that fires whenever a network connection is made or re-identified.
    I have been using 4001 for years. It happens when the Ethernet cable is plugged in.

    auto disabling of wifi when ethernet connected-4001.jpg
      My Computer


  2. Posts : 34,992
    Win 10 Pro (1903) (2nd PC is 21H2)
       #12

    Excellent- now just the action to disable Wifi.. then should be case closed.. perhaps as here:

    How to disable/enable WiFi Connection
      My Computers


  3. Posts : 1,334
    windows 10 PRO
    Thread Starter
       #13

    Will,have to think about that, looks promising, But if I turn the Ethernet off, I assume the WiFi won’t reconnect automatically........

    - - - Updated - - -

    OldNavyGuy said:
    The PowerShell script in post #7 runs as a Scheduled Task -

    "WLAN Manager runs as a scheduled task and will automatically disable your WLAN card when a LAN connection is verified. The WLAN card will be re-enabled once the LAN connection is lost. This ensures you'll have the fastest available connection and helps prevent network bridging."

    The command line options are documented in WLANManager.ps1

    The caveat to using the script is that it hasn't been verified (tested) on Windows 10, but it may work.

    Verified on the following platforms -

    Windows 10 No
    Windows Server 2012 No
    Windows Server 2012 R2 No
    Windows Server 2008 R2 No
    Windows Server 2008 No
    Windows Server 2003 No
    Windows Server 2016 No
    Windows 8 Yes
    Windows 7 Yes
    Windows Vista No
    Windows XP No
    Windows 2000 No
    Thanks, so one script, run from powershell, creates WLAN as a scheduled task ? The second script is actually used within the scheduler ? Wish the procedure was cleaner ....thanks
      My Computer


  4. Posts : 1,867
    Windows 10 Pro 2004 20H1
       #14

    The second script contains procedures that are called by WLANManager.ps1
      My Computer


  5. Posts : 7,457
    Windows 10 Home 20H2
       #15

    Is the OP's Ethernet connection started manually or automatically?
      My Computer


  6. Posts : 1,334
    windows 10 PRO
    Thread Starter
       #16

    Matthew Wai said:
    Is the OP's Ethernet connection started manually or automatically?
    Manually
      My Computer


  7. Posts : 7,457
    Windows 10 Home 20H2
       #17

    reddwarf4ever said:
    Manually
    How? Perhaps the command to start the connection and the command to disable WiFi can be written into a single script file, which can be run automatically via Task Scheduler. I can use either VBScript or CMD script to start my connection automatically.
      My Computer


  8. Posts : 1,334
    windows 10 PRO
    Thread Starter
       #18

    Matthew Wai said:
    How? Perhaps the command to start the connection and the command to disable WiFi can be written into a single script file, which can be run automatically via Task Scheduler. I can use either VBScript or CMD script to start my connection automatically.
    Hi
    are you offering to write such a script, ? Would be excellent if you could
      My Computer


  9. Posts : 7,457
    Windows 10 Home 20H2
       #19

    You have to specify what connection you use and how you start it.
      My Computer


  10. Posts : 7,457
    Windows 10 Home 20H2
       #20

    I can write a script similar to this one: https://www.tenforums.com/tutorial-s...ml#post1961047
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 19:34.
Find Us




Windows 10 Forums