Hi,
is it possible to implement a script thats runs after openvpn completed a secure connection?
Let me tell you, what I tried till now:
- installed OpenVPN-Client 2.4.5
- tried to insert one of the following lines in the Test.ovpn:
- up "C:\temp\OpenVPN\Config\Test_up.bat"
- up 'C:\temp\OpenVPN\Config\Test_up.bat'
- up C:\temp\OpenVPN\Config\Test_up.bat
- route-up "C:\temp\OpenVPN\Config\Test_up.bat"
- route-up 'C:\temp\OpenVPN\Config\Test_up.bat'
- route-up C:\temp\OpenVPN\Config\Test_up.bat
- ipChange "C:\temp\OpenVPN\Config\Test_up.bat"
- ipChange 'C:\temp\OpenVPN\Config\Test_up.bat'
- ipChange C:\temp\OpenVPN\Config\Test_up.bat
but no success. The script Test_up.bat was not executed.
Any ideas?
Thanks and best regards
Berny
automatically mount network drives (OpenVPN-Client 2.4.5)
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVpn Newbie
- Posts: 2
- Joined: Thu Apr 05, 2018 11:55 am
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: automatically mount network drives (OpenVPN-Client 2.4.5)
Read your log file ...
-
- OpenVpn Newbie
- Posts: 2
- Joined: Thu Apr 05, 2018 11:55 am
Re: automatically mount network drives (OpenVPN-Client 2.4.5)
problem solved.
The most import thing is, that I used the command "start" in the test_up.bat. This will produce a fork() and the gpUpdate_and_map.bat will never return.
Otherwise there will be a deadlock.
- my ovpn-File looks like this:
up 'C:\\Users\\test\\OpenVPN\\config\\test_up.bat'
- test_up.bat:
start .\gpUpdate_and_map.bat
- gpUpdate_and_map.bat:
:gpupdateOnceAgain
echo try to connect with AD ...
c:\windows\system32\gpupdate.exe
if errorlevel 0 goto gpupdateOK
goto gpupdateOnceAgain
:gpupdateOK
The most import thing is, that I used the command "start" in the test_up.bat. This will produce a fork() and the gpUpdate_and_map.bat will never return.
Otherwise there will be a deadlock.
- my ovpn-File looks like this:
up 'C:\\Users\\test\\OpenVPN\\config\\test_up.bat'
- test_up.bat:
start .\gpUpdate_and_map.bat
- gpUpdate_and_map.bat:
:gpupdateOnceAgain
echo try to connect with AD ...
c:\windows\system32\gpupdate.exe
if errorlevel 0 goto gpupdateOK
goto gpupdateOnceAgain
:gpupdateOK