Jump to content

Starting Netconnections


Recommended Posts

Greetings AutoIT Users,

Can someone post a better way to start netconnections. I searched the forums and could not find anything. Below is the code I am using now but I am sure there is a better way...

Run("control.exe netconnections")

WinWaitActive("Network Connections")

Send("My VPN{ENTER}")

WinWaitActive("Connect My VPN")

Send("password{ENTER}")

Sleep(15000)

Link to comment
Share on other sites

how we can create some for you without we have the exe file?

I am not sure about this, but if you are talking about the "control.exe" file referenced on the first line of the script it is part of Windows XP. It just starts the "control panel".

Link to comment
Share on other sites

Greetings AutoIT Users,

Can someone post a better way to start netconnections. I searched the forums and could not find anything. Below is the code I am using now but I am sure there is a better way...

Run("control.exe netconnections")

WinWaitActive("Network Connections")

Send("My VPN{ENTER}")

WinWaitActive("Connect My VPN")

Send("password{ENTER}")

Sleep(15000)

This should start your connection:

run("RunDll32.exe Rnaui.dll,RnaDial My VPN")
Link to comment
Share on other sites

Maybe rundll32.exe can be used to start the VPN directly without opening up the control panel's "Network Connection" folder. I am still searching Google but nothing yet...

Here is a good reference for the rundll32.exe commands:

http://www.dx21.com/SCRIPTING/RUNDLL32/REF...E.ASP?ISF=0&P=A

I ran across it someplace in these forums before and knew I needed to bookmark it.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...