Skip to content
Switch branches/tags
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Batch script that resets connection for wifi interface in Windows.

Something odd happens on a few embedded equipments with Windows 10. Wifi interface just stop working. AP was working fine, but interface just stop sending or receiveng data.

After a few manual tests I could confirm a few facts:

  • Host didn't hang.
  • Host operating system didn't log anything about this event.
  • AP didn't log anything in particular at that moment.
  • Windows command from console can't renew IP (ipconfig /release, ipconfig /renew)

I did make it working again when I used command to disable/enable wifi controller.

I built a batch script that can be run periodically using task manager. It checks if there is network connectivity. If not, then just restart interface.

Windows "ping.exe" command was not very usefull. When host is down, it returns exit code different from 0, but when host is unreachable, it returns 0. I had to use "fping" tool to detect network connectivity status in a useful manner for what I intended.

There are some manually defined variables in the batch file:

RUNDIR: folder where script and complementary files are located. DELAY: time in seconds that waits to enable interface, after disable it. TESTINGHOST: host used to test connectivity.

The script assumes wifi interface name is "Wi-Fi". This is used internally with command "netsh". Wifi interface name can be determined running the following command:

netsh interface show interface

I also built an xml file ("resetConnection.xml") to easily add batch script to task manager.

It is defined to run every 5 minutes. There is an internal reference for batch script path inside that file, so if you change destination folder you must modify entry in xml file.

To add batch file to task manager, start command prompt with administator permissions and run:

schtasks /create /XML resetConnection.xml /TN "resetConnection"

There's a log file you could check after every run ("resetConnection.log").



Batch that reset connection for wifi interface in Windows.



No releases published


No packages published