r1100r98 Posted March 23, 2006 Share Posted March 23, 2006 Greetings AutoIT Users, Can someone post a better way to start netconnections. I searched the forums and could not find anything. Below is the code I am using now but I am sure there is a better way... Run("control.exe netconnections") WinWaitActive("Network Connections") Send("My VPN{ENTER}") WinWaitActive("Connect My VPN") Send("password{ENTER}") Sleep(15000) Link to comment Share on other sites More sharing options...
jaenster Posted March 23, 2006 Share Posted March 23, 2006 how we can create some for you without we have the exe file? -jaenster Link to comment Share on other sites More sharing options...
r1100r98 Posted March 23, 2006 Author Share Posted March 23, 2006 how we can create some for you without we have the exe file?I am not sure about this, but if you are talking about the "control.exe" file referenced on the first line of the script it is part of Windows XP. It just starts the "control panel". Link to comment Share on other sites More sharing options...
r1100r98 Posted March 23, 2006 Author Share Posted March 23, 2006 Maybe rundll32.exe can be used to start the VPN directly without opening up the control panel's "Network Connection" folder. I am still searching Google but nothing yet... Link to comment Share on other sites More sharing options...
ivan Posted March 24, 2006 Share Posted March 24, 2006 (edited) I think you can also get the same result using the CLSID value "::{7007ACC7-3202-11D1-AAD2-00805FC1270E}". I'll see what I can do with that and get back to you in the course of the night. ivan Edited March 24, 2006 by ivan Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3 Link to comment Share on other sites More sharing options...
billmez Posted March 24, 2006 Share Posted March 24, 2006 Greetings AutoIT Users, Can someone post a better way to start netconnections. I searched the forums and could not find anything. Below is the code I am using now but I am sure there is a better way... Run("control.exe netconnections") WinWaitActive("Network Connections") Send("My VPN{ENTER}") WinWaitActive("Connect My VPN") Send("password{ENTER}") Sleep(15000) This should start your connection: run("RunDll32.exe Rnaui.dll,RnaDial My VPN") Link to comment Share on other sites More sharing options...
ivan Posted March 24, 2006 Share Posted March 24, 2006 This should start your connection: run("RunDll32.exe Rnaui.dll,RnaDial My VPN") nice one! Run("rundll32 shell32.dll, control_rundll ncpa.cpl") also launches the explorer window Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3 Link to comment Share on other sites More sharing options...
billmez Posted March 24, 2006 Share Posted March 24, 2006 Maybe rundll32.exe can be used to start the VPN directly without opening up the control panel's "Network Connection" folder. I am still searching Google but nothing yet...Here is a good reference for the rundll32.exe commands:http://www.dx21.com/SCRIPTING/RUNDLL32/REF...E.ASP?ISF=0&P=AI ran across it someplace in these forums before and knew I needed to bookmark it. 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