I have 2 VPN and sometimes I should switch them very often. I decided to create .bat file which could connect to desired VPN with credentials set in this file.
So I create .bat file with following code:
vpncli.exe -s < 1.txt
Where 1.txt contains credentials of VPN #1 which has trusted cerficate. here's what 1.txt contains:
connect <vpn1.some.host> 1 <password>
Where 1 goes for GROUP with number 1.
The second VPN is untrusted and I have this prompt awaring me what VPN is untrusted. I used similar code for .bat file:
vpncli.exe -s < 2.txt
And following data in 2.txt:
connect <vpn2.some.host> y <GROUP> <LOGIN> <PASSWORD>
("y" goes for accepting untrusted server)
But now it says "Login failed" after entering password is prompted and then it appears in loop and never stops.
The question is: how should I modify my 2.txt file to make script connect to VPN #2?