Guest Gward Posted March 12, 2004 Share Posted March 12, 2004 (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 March 12, 2004 by Gward Link to comment Share on other sites More sharing options...
ezzetabi Posted March 12, 2004 Share Posted March 12, 2004 What do you want open if you have no .exe? Link to comment Share on other sites More sharing options...
Guest Gward Posted March 12, 2004 Share Posted March 12, 2004 (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. 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 March 12, 2004 by Gward Link to comment Share on other sites More sharing options...
trids Posted March 12, 2004 Share Posted March 12, 2004 Run(@COMSPEC & ' /c "H:\System Stuff\Profile\Desktop\MyShortcut.lnk"',"", @SW_HIDE) Link to comment Share on other sites More sharing options...
Guest Gward Posted March 12, 2004 Share Posted March 12, 2004 Thanks for your code, but you won't believe it: it will work with every *.lnk, but not with a VPN link So I am still looking for a solution..... Link to comment Share on other sites More sharing options...
CyberSlug Posted March 12, 2004 Share Posted March 12, 2004 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 More sharing options...
Valik Posted March 12, 2004 Share Posted March 12, 2004 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. Link to comment Share on other sites More sharing options...
Developers Jos Posted March 12, 2004 Developers Share Posted March 12, 2004 (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 March 12, 2004 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 More sharing options...
Guest Gward Posted March 13, 2004 Share Posted March 13, 2004 Thanks JdeB. Your code was the one I was looking for. It's working fine! Gward Link to comment Share on other sites More sharing options...
dazco Posted July 7, 2004 Share Posted July 7, 2004 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? Link to comment Share on other sites More sharing options...
Developers Jos Posted July 7, 2004 Developers Share Posted July 7, 2004 run(@SystemDir & '\RasPhone -h "connectionname"') 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 More sharing options...
sykes Posted July 7, 2004 Share Posted July 7, 2004 From a command prompt type "rasdial.exe /?" and it will show all of the options. I use Rasdial.exe "My Connection" myusername mypassword Andrasdial.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 More sharing options...
dazco Posted July 7, 2004 Share Posted July 7, 2004 thanks both of you.... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now