Jump to content

Recommended Posts

Guest Gward
Posted (edited)

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
Guest Gward
Posted (edited)

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
Guest Gward
Posted

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

Posted

Before you try that, is it really a shortcut? Maybe it created a special object on your desktop which isn't a true shortcut, but exhibits the same behavior as one.

  • Developers
Posted (edited)

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

Guest Gward
Posted

Thanks JdeB. :whistle: Your code was the one I was looking for. It's working fine!

Gward

  • 3 months later...
Posted

Sorry to bring back old posts, but can someone tell me what i would need to change in both those lines to close the connection?

Posted

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?

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
  • Recently Browsing   0 members

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