|
|
On Sun, 3 Oct 2004, Franki wrote:
Mathias Sundman wrote:
On Fri, 1 Oct 2004, franki wrote:
One last thing, its been years since I did any significanct DOS coding..
is there a way on win2000/XP to fork a process into the background? I'd
like to put two batch files on the desktop, one to initiate the VPN, set
the route, and delete the normal locally mapped drives (the ones people
use when they are on the local network at work) and then create the VPN
mapped network drives.
I'd recommend using the --route-up option in openvpn to call a batch file,
and in that batch file call a second batch file with "start batch2.bat" to
map the drives.
Or better yet, use my GUI (http://www.nilings.se/openvpn) to launch
openvpn :-) In the latest release (1.0-beta19) I added a feature to
execute a batch file after a connection has sucessfully been established,
and routes have been added to the system. This batch file can map your
drives directly without having to call a second batch file with start, as
it's beeing run as a diffrent thread/process than openvpn.
I am already running your GUI program, but after many attempts to use the
--route-up to start a batch file, I found that it wasn't waiting till the
connection was established before running, so putting the route statement and
the drive mapping in there was not successful. (I actually found that putting
a ping 127.0.0.1 into the bat file before the others, slowed it down abit and
sometimes helped, but I don't like bodgy hacks.)
Well, the connection is etablished as far as openvpn is concerned, but for
some reason it does not seem to be possible to map a share on a remote
server without waiting a few seconds.
Pinging the remote server works right away, but not mapping it with "NET
USE * \\IP_ADDRESS\XX".
The other problem is that you can't use the route-up script directly to
map a remote share, as openvpn is single-threaded, so it is not processing
any packets while waiting for the route-up script to finish.
For this reason I added the "run connect script" in the GUI. You use it by
simple butting a batch file named xxx_up.bat in the config folder where
xxx is the same name as your openvpn config file.
Even with my connect script it seems to be necessary to wait a few seconds
before mapping. 3-4 seconds usually works for me.
--
_____________________________________________________________
Mathias Sundman (^) ASCII Ribbon Campaign
OpenVPN GUI for Windows X NO HTML/RTF in e-mail
http://www.nilings.se/openvpn / \ NO Word docs in e-mail
____________________________________________
Openvpn-users mailing list
Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openvpn-users
|