Jump to content
Sign in to follow this  
Guest Gward

Startup Vpn

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

Share this post


Link to post
Share on other sites
ezzetabi

What do you want open if you have no .exe? :whistle:

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
trids

Run(@COMSPEC & ' /c "H:\System Stuff\Profile\Desktop\MyShortcut.lnk"',"", @SW_HIDE)
:whistle:

Share this post


Link to post
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.....

Share this post


Link to post
Share on other sites
Valik

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.

Share this post


Link to post
Share on other sites
Jos

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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest Gward

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

Gward

Share this post


Link to post
Share on other sites
dazco

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?

Share this post


Link to post
Share on other sites
sykes

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?

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.