Jump to content

Startup Vpn


Guest Gward
 Share

Recommended Posts

Guest Gward

I am a beginner with Autoit. I'm looking for a command to startup a VPN connection with XP or to start a shortcut. I have no exe file or lnk. I can make a *.lnk, but don't know how tot run a shortcut in autoit.

Thanks

Edited by Gward
Link to comment
Share on other sites

Guest Gward

If you want to make a VPN connection in windows XP, you can use the connection wizard. After the (network)connection is made, there is an icon in the Networkmap. This is not a windows-shortcut, but it is possible to make a shortcut on, for example, the desktop, or somewhere else in the root.

I made a shortcut on the desktop and now I want to start this shortcut. I think this is the only way to start up the VPN connection (because there is no exe file of the VPN connection). A few days ago I saw a command to start a shortcut in this forum, but I can't find this anymore. :whistle:

So, two questions: does anyone know a command to start a VPN connection and what is the command to start a shortcut (Run works only with a exe file.)?

Thanks

Edited by Gward
Link to comment
Share on other sites

Guest Gward

Thanks for your code, but you won't believe it: it will work with every *.lnk, but not with a VPN link :whistle: So I am still looking for a solution.....

Link to comment
Share on other sites

Strange. Perhaps you could try calling the shortcut from a batch file?

REM someBatchFile.bat
"H:\System Stuff\Profile\Desktop\MyShortcut.lnk"

; AutoIt script ...
Run("someBatchFile.bat","", @SW_HIDE)
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

  • Developers

the command to start a connection is:

C:\Windows\system32\RasPhone -d "connectionname"

this also works with a VPN definition...

in autoit syntax:

run(@SystemDir & '\RasPhone -d "connectionname"')
Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • 3 months later...

From a command prompt type "rasdial.exe /?" and it will show all of the options.

I use

Rasdial.exe "My Connection"  myusername mypassword

And

rasdial.exe "My Connection" /disconnect

You need to use quotes on the connection name/username/password entries if they have spaces in their names

there are other options you can use such as including a domain name and phone number as well

We have enough youth. How about a fountain of SMART?

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...