There isn't really any way to do that on a client OS before you connect,
because the interface doesn't exist until the connection is made. With a
server you can use RRAS and set up a demand-dial interface for the
connection. You can then link the route to the dd interface, and the OS will
add the route to the routing table when the connection is made.
The other way to do it would be to use CMAK on the server and have the
client download its config from the server.
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
>I would like a static route to be added whenever I establish a certain
> PPTP connection. I'm currently doing this by hand, and I'd like to
> automate it.
>
> Here's the scenario. Internal corporate network is 192.168.0.0/16
> Connect to VPN. Route automatically added to 192.168.0.0/16 via PPTP
> adapter. There's an additional internal corporate network
> 10.0.0.0/16. I currently have to add the route by hand for this.
> netsh doesn't seem to know about PPTP adapters, so I can't use its
> "add persistentroute" command.
>
> Note that I do not wish to make the PPTP adapter my default gateway,
> either.
>
> Thanks!
>
|