Script to ping and reset connection
Go to solution
Solved by DumbTrollface,
Found out that ping does indeed return an exit code and that you can check the exit code of the previous programm by using %errorlevel%.
@echo off ping router if %errorlevel% NEQ 0 (disable_device timeout /nobreak /t 10 //Wait 10 seconds enable_device )
And after some testing it seems to work.
EDIT: If someone is curious: I use devcon for disabling and enabling the device
-
Featured Topics
-
Topics
-
0
-
LambdaBird ·
Posted in General Discussion1 -
0
-
7
-
3
-
2
-
joe_ollie909 ·
Posted in CPUs, Motherboards, and Memory8 -
DreamCat04 ·
Posted in PC Gaming1 -
saltycaramel ·
Posted in Tech News3 -
4
-
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now