Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

'route add' commande in batch file

1,360 views
Skip to first unread message

Fred

unread,
Mar 13, 2002, 3:23:42 AM3/13/02
to
Hello,
I'm trying to add a persistent route on a computer running
win98. The only solution I found (knowledge DB) told me to
put the route add command in a batch file. The thing is I
don't know how to do it.
I tried to simply create a c:\route.bat containing the
following line and starting at each logon (scheduled
tasks):
route add 'destination' mask 'TheMask' 'gateway'
But when the file is launched, it runs as a loop and never
end. Moreover, the route is even not created :-(
Could anybody help me explaining how batch file are
running or even proposing a real solution, please???
Thanks a lot in advance.
Sincerely,
Fred.
fred...@hotmail.com

Paul Mathieu

unread,
Mar 13, 2002, 4:06:17 AM3/13/02
to
Don't know about the persistanceness, but did you add METRIC 1 after the
"gateaway'.

LOL - You just happen to catch me when I'm playing around with the same
exact test. Will monitor this thread and keep you posted.

Paul
"Fred" <fred...@hotmail.com> wrote in message
news:2c5401c1ca68$62bcbb70$a4e62ecf@tkmsftngxa06...

Fred

unread,
Mar 13, 2002, 4:00:35 AM3/13/02
to
No I didn't (it was said that metric is set at 1 by
default)...
I'll carefully keep looking at the messages :-)

Fred.

>.
>

Paul Chitescu

unread,
Mar 13, 2002, 6:36:43 AM3/13/02
to
"Fred" <fred...@hotmail.com> wrote:
> [...]

> I tried to simply create a c:\route.bat containing the
> following line and starting at each logon (scheduled
> tasks):
> route add 'destination' mask 'TheMask' 'gateway'
> But when the file is launched, it runs as a loop and never
> end. Moreover, the route is even not created :-(
> [...]

You must name the batch file other than "route" since now the batch
re-executes itself! Use "routes.bat" or "static_r.bat" or something similar.

Or, you can add the route command with disk letter and full path. Not
recommended since you still can accidentally invoke manually the batch
instead of the real command.

If you need to add he route before logging on (for example to log in to a NT
domain) consider using a Registry entry instead.

--
Paul Chitescu
pchi...@pchitescu.myip.org http://pchitescu.myip.org/ ICQ:22641673
Any spammers will be painfully squeezed into /dev/null


Richard G. Harper

unread,
Mar 13, 2002, 6:47:51 AM3/13/02
to
You need to name the batch file something besides ROUTE ... since you're
trying to execute the ROUTE command in the batch file ... it just keeps
calling itself instead of the real ROUTE command ... :-)

--
Richard G. Harper (rgha...@email.com) MSMVP MPS-D
* NOTE - Private E-Mail is generally not replied to. Please post all
* questions and replies in the newsgroups for the benefit of everyone.
* Help US help YOU ... http://www.dts-l.org/goodpost.htm


"Fred" <fred...@hotmail.com> wrote in message
news:2c5401c1ca68$62bcbb70$a4e62ecf@tkmsftngxa06...

Fred

unread,
Mar 13, 2002, 9:04:22 AM3/13/02
to
OK,
For now, the computer is in use so I can't try it yet.
If it doesn't work, I'll repost a message but anyway,
thanks a lot for your help (I keep my fingers crossed ;-)
and hope it will be the good thing).

Best Regards,
Fred.

>.
>

See signature below

unread,
Mar 13, 2002, 2:17:22 PM3/13/02
to
On Wed, 13 Mar 2002 00:23:42 -0800, "Fred" <fred...@hotmail.com>
wrote:

>Hello,
>I'm trying to add a persistent route on a computer running
>win98. The only solution I found (knowledge DB) told me to

Not sute I understand the overall question, but I set up a route Batch
file when I was using @home and wanted to start a dialup connection.

I know there are problems when trying to connect to some one local,
and you need a route. Is that what you are wanting? I just created a
shortcut in the Startup with the command line something like this as
one line of course.
C:\WINDOWS\COMMAND\START.EXE /w C:\WINDOWS\ROUTE.EXE add 24.17.43.141
mask 255.255.255.255 24.12.152.129

Here is a example of what I did in a file called router.bat. I do see
that the route command lines got word wrapped so please adjust
accordingly....

REM news
start /w C:\WINDOWS\ROUTE.EXE add 24.2.192.37 mask 255.255.255.255
24.12.152.129
REM mail
REM start /w C:\WINDOWS\ROUTE.EXE add 24.254.60.13 mask
255.255.255.255 24.12.152.129
REM Yahoo Mail
REM start /w C:\WINDOWS\ROUTE.EXE add 216.136.173.10 mask
255.255.255.255 24.12.152.129
REM LAN
start /w route add 192.168.0.2 mask 255.255.255.255 192.168.0.1
start /w route add 192.168.0.3 mask 255.255.255.255 192.168.0.1
start /w C:\WINDOWS\ROUTE.EXE Print


You know what to do: shdb at slip dot net

Fred

unread,
Mar 14, 2002, 3:21:52 AM3/14/02
to
Cheers,
It's excactly what I needed :-)
Thanks a lot to each of you.
Hope to be able to help you back in the future ;-)
Rgrds,
Fred.

>.
>

0 new messages