The wireless.vbs file (error checking code removed) Dim strMyGate Dim strMyIP On Error Resume Next set IPConfigSet = GetObject("winmgmts:{impersonationLevel=impersonate}!root\cimv2").ExecQuery("SELECT IPAddress, DefaultIPGateway, IPSecPermitTCPPorts FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled=TRUE") for each IPConfig in IPConfigSet if Not IsNull(IPConfig.IPAddress) then for i = LBound(IPConfig.IPAddress) to UBound(IPConfig.IPAddress) if IPConfig.IPAddress(i) <> "0.0.0.0" then strMyIP = IPConfig.IPAddress(i) end if next end if if Not IsNull(IPConfig.DefaultIPGateway) then for i=LBound(IPConfig.DefaultIPGateway) to UBound(IPConfig.DefaultIPGateway) strMyGate = IPConfig.DefaultIPGateway(i) next end if next Set d = CreateObject("WScript.Shell") d.Run "cmd /c deletetunnel.bat " WScript.Sleep 2000 Set t = CreateObject("WScript.Shell") t.Run "cmd /c vpn.bat " & strMyGate & " " & strMyIP WScript.Sleep 1000 Set w = CreateObject("WScript.Shell") w.Run "cmd /k authpf.bat " & strMyGate