Got it! function getDefaultIf() { if (run("route print").match(/(0\.0\.0\.0) *([0|128]\.0\.0\.0) *([0-9\.]*) *([0-9\.]*[0-9\.]*[0-9\.]*[0-9]*) *(.*)/) ){ return (RegExp.$4); } return (""); } iface = getDefaultIf() ; ----- Original Message ----- From: "David Woodhouse" <dwmw2 at infradead.org> To: "Steven Petraglia" <spetragl at optonline.net> Cc: <openconnect-devel at lists.infradead.org> Sent: Saturday, January 31, 2015 1:19 PM Subject: Re: Question on vpnc-script-win.js Script On Sat, 2015-01-31 at 13:11 -0500, Steven Petraglia wrote: > > I want to do the same thing in the script. > I can use the 'gw' variable for 192.168.1.1, but where do I get the > (pre-connect) Interface from? By parsing the output of 'route print' before you modify the routing table? Or does 'route get' work on Windows? -- dwmw2