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...
Ideas?
Thanks !
Automatic connection and BAT file
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVpn Newbie
- Posts: 1
- Joined: Mon Mar 14, 2016 4:14 pm
- Traffic
- OpenVPN Protagonist
- Posts: 4066
- Joined: Sat Aug 09, 2014 11:24 am
Re: Automatic connection and BAT file
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 ..
Why this little factoid is not in the manual is a matter for discussion ..
-
- OpenVpn Newbie
- Posts: 4
- Joined: Tue May 31, 2016 7:45 pm
Re: Automatic connection and BAT file
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 ?
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 ?
-
- OpenVpn Newbie
- Posts: 18
- Joined: Fri Sep 12, 2014 3:29 pm
Re: Automatic connection and BAT file
Personally, if you followed the Windows 10 upgrade path .. I would roll back to Windows 7.
-
- OpenVpn Newbie
- Posts: 4
- Joined: Tue May 31, 2016 7:45 pm
Re: Automatic connection and BAT file
I Had The temptation to Turn back to win7 but my new PC has only win10
- disqualified
- OpenVPN User
- Posts: 40
- Joined: Fri Jun 03, 2016 7:13 pm
Re: Automatic connection and BAT file
Read the manual for windows:
Code: Select all
> net help use
-
- OpenVpn Newbie
- Posts: 4
- Joined: Tue May 31, 2016 7:45 pm
Re: Automatic connection and BAT file
Thanks , but I have not found an indication . can you tell me anything more?