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

  1. Fafhrd's Avatar
    Posts : 1,935
    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 ComputersSystem Spec

  2.    #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 ComputerSystem Spec

  3. Brink's Avatar
    Posts : 37,058
    64-bit Windows 10 Pro build 18860
       #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 ComputersSystem Spec

  4.    #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 ComputerSystem Spec

  5. Compumind's Avatar
    Posts : 741
    Windows 10 Pro x64, Various Linux Builds, Internet Security Specialty.
       #5

    Samuria said: View Post

    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 ComputerSystem Spec

  6. Fafhrd's Avatar
    Posts : 1,935
    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 ComputersSystem Spec

  7. Fafhrd's Avatar
    Posts : 1,935
    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 ComputersSystem Spec

  8. f14tomcat's Avatar
    Posts : 39,905
    Triple boot - Win 10 Pro, Win 10 Pro Insider (2) - (and a sprinkling of VMs)
       #8

    Fafhrd said: View Post
    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; 3 Days Ago at 12:22. Reason: added tutorial link for more info
      My ComputersSystem Spec

  9. Fafhrd's Avatar
    Posts : 1,935
    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 ComputersSystem Spec


  10. Posts : 1,349
    Windows 10 Home x64 and Pro x86
       #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; 1 Day Ago at 10:07.
      My ComputerSystem Spec


 

Related Threads
Every time i think I have it right, Microsoft "moves the cheese". Is there any current one-run script or registry update that can do all the following: Turn on Network discovery and make the network I am connected to Private at the same time ...
Greetings. I'm a Mac to PC convert and starting to love it. But there are a few things I need to make life a little easier. The need of this thread has already been discussed here -- Alternative way to launch Task View ? Solved - Windows 10...
I am using Windows 10 Home on a HP i3 laptop. Just recently I have started receiving an error pop-up which says "Windows Script Host - There is no script engine for file extension ".js"". There doesn't seem to be a pattern to when the error...
My case has a reset switch, which is useless. I'd like to convert it into a sleep button. The motherboard doesn't support it, but I have two spare USB 2.0 headers. is there some sort of adapter I can buy? Kind of like an ecobutton that plugs into a...
Good morning guys, I want some help from you guys as you can tell from the title I need a simple .bat or any type of script that initiate my .reg file on my desktop when my Microsoft word 2016 closes and this should happen without any...
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:01.
Find Us