Page 1 of 1

Automatic connection and BAT file

Posted: Mon Mar 14, 2016 5:07 pm
by sif90
Hello all!

I'm trying to find a way to run a BAT script when the tunnel has gone up. I have in my Config folder :
- yolo.ovpn
- yolo_up.bat

Yolo_up.bat runs well when i start manually the Open VPN connection (right click, Connect). But i want a automatic connection. So i modified the Open VPN Service target to :
"C:\Program Files\OpenVPN\bin\openvpnserv.exe" --connect yolo.ovpn (Statup Type: Automatic).

Now, the automatic connection work but not yolo_up.bat... :roll:

Ideas?

Thanks !

Re: Automatic connection and BAT file

Posted: Mon Mar 14, 2016 5:56 pm
by Traffic
The --up script is a little teaser because the tunnel is not available to pass data until all scripts have successfully completed.

Why this little factoid is not in the manual is a matter for discussion .. :twisted:

Re: Automatic connection and BAT file

Posted: Tue May 31, 2016 7:54 pm
by mototopo
hi, i have the same problem :
my _UP.BAT script ends in failure .

I have only one row with a net use command.
with win7 has always worked well ; now with win10 does not finish the script .

You have any ideas on how to fix it ?

Re: Automatic connection and BAT file

Posted: Tue May 31, 2016 8:06 pm
by FalconTent
Personally, if you followed the Windows 10 upgrade path .. I would roll back to Windows 7.

Re: Automatic connection and BAT file

Posted: Tue May 31, 2016 8:14 pm
by mototopo
I Had The temptation to Turn back to win7 but my new PC has only win10

Re: Automatic connection and BAT file

Posted: Fri Jun 03, 2016 7:19 pm
by disqualified
Read the manual for windows:

Code: Select all

> net help use

Re: Automatic connection and BAT file

Posted: Mon Jun 06, 2016 8:07 pm
by mototopo
Thanks , but I have not found an indication . can you tell me anything more?