Kuon

Beginners problem

6 posts in this topic

Hello guys I'm pretty new to AutoIt so I got stuck in this I guess dumb problem while trying to check if my VPN connection is active,

What's been happening is I made a little script that connects to the VPN via mouse location ( this parts fine ) but I can't find a way to check if it successfully connected after all it just clicks on connect once :D, meaning that sometimes it gets like a timeout error and I'm stuck here working my own stuff because I assumed that it connected :'(

Share this post


Link to post
Share on other sites



That the thing I don't know how to check its not a syntax error I just totally ignored the possibility of it timing out and not connecting :P

Share this post


Link to post
Share on other sites

Oh and I did google first found the ping option etc but since the IP changes its not always the same :S

Share this post


Link to post
Share on other sites

With VPN are you not getting access to an inside address that you otherwise do not have access too?

All that matters is that you know an internal IP you can ping, not the IP  your connecting with.

 

Else if your checking your adapter IP's and looking to see if you have a VPN IP usually they are in the same subnet range so you can check for the "general" IP instead of the exact one.

 

Example: 

Local IP = 192.168.1.15

VPN IP = 10.0.15.63

VPN Check If IP = 10.X.X.X then VPN is connected

1 person likes this

Share this post


Link to post
Share on other sites

#6 ·  Posted

There is likely a virtual network adapter which gets the assigned VPN IP address.  If you can identify that connection/adapter, you should be able to query WMI for the assigned IP. 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now