Sign in to follow this  
Followers 0
bubbolo

create new VPN connection

4 posts in this topic

hi,

I would create with AutoIT3 a script (and then a exe file) to automate the creation of a VPN connection on a pc running windows 2000 or XP.

The script must run in silent mode and it must show a msgbox windows only when the VPN connection is created on the pc connection bin.

How I can do it?

Thanks.

bye.

Share this post


Link to post
Share on other sites



I've been looking in to this too. There is a phonebook file that contains all of the connections that have been created (vpn and dial-up). Google "rasphone.pbk". You can try editing that file and manually creating the vpn connection. After looking at it for awhile though, it seemed very complicated. I have found ways to silently dial connections that have already been created. Lookup "rasdial" and "rasphone".

There are some windows api functions to create connections, but from what I saw, it looked like you still had to use a dialog box to create the connection. I am not a very experienced programmer though, so someone else might be able to understand it better than I can. The functions all seemed to start with "ras".

Share this post


Link to post
Share on other sites

yeah, you can just create the connection on your computer. then copy the text from the rasphone.pbk file into your script. If you append those lines to another rasphone.pbk, it'll duplicate the connection. I've tested this for a project I was working on last year. It'll work.

Also, for those who aren't interested in this specific problem, but more general vpn info, open a command window and type in

rasphone -h

that will get you started :-)

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
Sign in to follow this  
Followers 0