You create a batch file called route.bat or route.cmd and it contains something similar to the following:
Route add 10.1.0.0 MASK 255.255.0.0 10.50.5.125
When you run it as an Administrator it never finishes. You remove the “echo off” to see what is going on. You run it again and see it in an endless loop. When you cut and paste the command “route add…” in an Administrative command prompt it works as expected but your batch file keeps looping.
Never name your batch file the same name as the executable it runs.
The reason in the example is the naming of the batch file is “route.” and your batch file is calling out to run the command “route”, It is executing itself in a never ending loop. Renaming the batch file something other than “route” and it will work fine.
Happy Batch Creation!