Sure. Use "C:\Program Files\ShrewSoft VPN Client\ipsecc.exe" -r ConnName -u User -p Password -a
to connect. I can't remember if ipsecc waits until disconnected or returns immediately - in the later case you need to start it with start /w, as shown below. The complete script should look like this: @echo off :loop start /w "Shrew" "C:\Program Files\ShrewSoft VPN Client\ipsecc.exe" -r ConnName -u User -p Password -a ping -n 6 127.0.0.1 >nul goto loop (The ping is used to implement a 5 second grace period for stopping the batch). Clemens Hoffmann ________________________________ Von: [email protected] [[email protected]] im Auftrag von Zsolt Fejer [[email protected]] Gesendet: Donnerstag, 6. Januar 2011 13:01 An: [email protected] Betreff: [vpn-help] Connect to VPN from Command line (Win7) Hi, Is there any way to connect to a VPN via Command Line? Either cmd script or Powershell. I have a pretty unreliable network and it’d be good to monitor the connection and reconnect whenever it drops the line. regards Zsolt Fejer Systems Administrator Email: [email protected] Switchboard: +44 (0) 1628 550450 Address: The Chapel, Grenville Court, Britwell Road, Burnham, SL1 8DF, United Kingdom [cid:[email protected]]<http://www.orb-data.com/> [cid:[email protected]] <http://www.ibm.com/> Orb Data Limited, registered in England No. 03429749 Registered Office, 29 Devizes Road, Swindon, Wiltshire, SN1 4BG, United Kingdom ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
<<inline: image001.gif>>
<<inline: image002.jpg>>
_______________________________________________ vpn-help mailing list [email protected] http://lists.shrew.net/mailman/listinfo/vpn-help
