Is there a simple script to reset the wi-fi adapter


  1. Posts : 1,983
    Windows 10 x86 14383 Insider Pro and Core 10240
       #1

    Is there a simple script to reset the wi-fi adapter


    As Windows 10 evolves, and my hardware gets older, I am finding that wi-fi connections on both laptops (HP/Compaq PresarioCQ57, and Dell latitude E6400) are dropping more frequently.

    I guess that the Microsoft Windows 10 driver updates are less compatible with the old hardware than they used to be - I rarely, if ever, had (or have on occasions I still use Windows 8.1) any dropouts with Windows 8/8.1.

    I also believe that TCP/IPv6 (which my network provider's router cannot utilize) is the main cause of the problem. If I disable IPv6, then some Windows 10 network functionality is lost. In the past TCP/IPv4 gave me all the internet and connectivity I needed, and still would, except for Windows 10 reliance on IPv6 for location on the network.

    The connection to the router remains valid as far as Windows is concerned, but the internet access is not available.

    Windows 7 used to have this sort of problem much more commonly, and the solution always was, and is in Windows 10, cured by resetting the adapter, but the diagnostics take up more time than is necessary to get reconnected.

    Is there a simple script to disconnect and reset the adapter to restore the connection?

    I seem to have forgotten what I used to do, but I think I used to use

    ipconfig /flushdns

    then

    ipconfig /release

    followed by

    ipconfig /renew

    Neither does

    netsh int ip reset

    seem to resolve the issue,it seems.
      My Computers


  2. Posts : 5,328
    Windows 11 Pro 64-bit
       #2

    I have batch script for resetting tcp/ip protocol stack i hope this is what you are asking for.
    Is there a simple script to reset the wi-fi adapter Attached Files
      My Computer


  3. Posts : 68,894
    64-bit Windows 11 Pro for Workstations
       #3

    Hello Chris,

    You could use an option in the tutorial below to reset all network adapters.

    Reset Network Adapters in Windows 10 | Tutorials
      My Computers


  4. Posts : 8,103
    windows 10
       #4

    If it stays connected to the router its normally a router problem

    Save all the txt below a test.cmd then right click and choose run as admin post results

    ipconfig /all >reg.txt
    netsh wlan show networks mode=bssid >> reg.txt
    netsh wlan show profile >> reg.txt
    ping 194.119.131.66 >> reg.txt
    ping plus.net >>reg.txt
    tracert 194.119.131.66 >>reg.txt
    net start >>reg.txt
    wmic startup list full >>reg.txt
    ver >>reg.txt
    tasklist >>reg.txt
    netsh interface ipv4 show subinterfaces >>reg.txt
    netsh int tcp show globa >>reg.txt
    route print >>reg.txt
    nbtstat -s >>reg.txt
    netstat -n -o >>reg.txt
    nslookup Plusnet Reliable >>reg.txt
    reg.exe query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run >>reg.txt
    reg.exe query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce >>reg.txt
    reg.exe query HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run >>reg.txt
    reg.exe query HKCU\Policies\Explorer\Run >>reg.txt

    Notepad.exe reg.txt
      My Computer


  5. Posts : 5,048
    Windows 10/11 Pro x64, Various Linux Builds, Networking, Storage, Cybersecurity Specialty.
       #5

    Samuria said:

    Save all the txt below a test.cmd then right click and choose run as admin post results

    ipconfig /all >reg.txt
    netsh wlan show networks mode=bssid >> reg.txt
    netsh wlan show profile >> reg.txt
    ping 194.119.131.66 >> reg.txt
    ping plus.net >>reg.txt
    tracert 194.119.131.66 >>reg.txt
    net start >>reg.txt
    wmic startup list full >>reg.txt
    ver >>reg.txt
    tasklist >>reg.txt
    netsh interface ipv4 show subinterfaces >>reg.txt
    netsh int tcp show globa >>reg.txt
    route print >>reg.txt
    nbtstat -s >>reg.txt
    netstat -n -o >>reg.txt
    nslookup Plusnet Reliable >>reg.txt
    reg.exe query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run >>reg.txt
    reg.exe query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce >>reg.txt
    reg.exe query HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run >>reg.txt
    reg.exe query HKCU\Policies\Explorer\Run >>reg.txt

    Notepad.exe reg.txt
    Interesting! Did you write this?
      My Computer


  6. Posts : 1,983
    Windows 10 x86 14383 Insider Pro and Core 10240
    Thread Starter
       #6

    It does not require a lengthy reboot, or writing any textfile reports - running Windows network diagnostics, after all its checks have finished, just announces that the wifi adapter is being reset, and the internet is immediately available again - that's all what I would like a script to do. Just reset the network (Wi-Fi) adapter.
      My Computers


  7. Posts : 1,983
    Windows 10 x86 14383 Insider Pro and Core 10240
    Thread Starter
       #7

    Further to this, if I open Device Manager (Devmgmt.msc) and network adapters, right-click the adapter, disable it, confirm that I want to do this, and then re-enable it, it will reconnect as it should, rather more quickly than running network diagnostics.

    So again, is there a script to disable the network adapter, and another to re-enable it that could be run in a .cmd file?
      My Computers


  8. Posts : 56,825
    Multi-boot Windows 10/11 - RTM, RP, Beta, and Insider
       #8

    Fafhrd said:
    Further to this, if I open Device Manager (Devmgmt.msc) and network adapters, right-click the adapter, disable it, confirm that I want to do this, and then re-enable it, it will reconnect as it should, rather more quickly than running network diagnostics.

    So again, is there a script to disable the network adapter, and another to re-enable it that could be run in a .cmd file?
    Have a look here. MS article on disable/enable using netsh command. Just plug in the adapter name and save it as .bat.

    script to disable enable network interface - Microsoft Community

    Enable or Disable Network Adapters in Windows
    Last edited by Brink; 20 Mar 2019 at 12:22. Reason: added tutorial link for more info
      My Computers


  9. Posts : 1,983
    Windows 10 x86 14383 Insider Pro and Core 10240
    Thread Starter
       #9

    Thank you Dick (and of course Shawn), and everyone who has responded here. It is amazing how just a little change in the wording of a question, or mentioning an alternative way of doing something in Windows brings about what seems to be a solution. I'll have to wait for the problem to arise again before I can try things out for real, but I'll post here when they do. Thanks again.
      My Computers


  10. Posts : 16,932
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #10

    Further to this, if I open Device Manager (Devmgmt.msc) and network adapters, right-click the adapter, disable it, confirm that I want to do this, and then re-enable it, it will reconnect as it should, rather more quickly than running network diagnostics.

    So again, is there a script to disable the network adapter, and another to re-enable it that could be run in a .cmd file?
    Just to offer some encouragement, I often have to do this on one middle-aged computer. My wifi card is called "Wi-Fi" and I run a single script to do the job [the commands are in the TenFormsTutorials Option 3 link posted by Dick above] so I just click on the batch file's shortcut, give it Admin permission and the wifi card then behaves itself.


    DisableEnableWiFiCard.bat
    Code:
    netsh interface set interface "Wi-Fi" disabled
    netsh interface set interface "Wi-Fi" enabled
    Denis
    Last edited by Try3; 22 Mar 2019 at 10:07.
      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 18:59.
Find Us




Windows 10 Forums