Sobiech Posted April 4, 2010 Share Posted April 4, 2010 Topic said what i need What function i must use? I think the best way will be "Disconnect" and after "Connect" with my Connection. Dont have Enlish Windows, but it should be (in Vista) Start / Connect With / <MyConnection> / Disconnect and next time just Connect with <MyConnection> Maybe _WinNet_UseConnection or _WinNet_RestoreConnection O_o Thx for any help This world is crazy Link to comment Share on other sites More sharing options...
GrayFox Posted April 4, 2010 Share Posted April 4, 2010 I dont know about _WinNet*, though couldnt you use ipconfig? As in: RunWait(@ComSpec & " /c " & "ipconfig /release") RunWait(@ComSpec & " /c " & "ipconfig /flushdns") RunWait(@ComSpec & " /c " & "ipconfig /renew") Link to comment Share on other sites More sharing options...
MiserableLife Posted April 4, 2010 Share Posted April 4, 2010 (edited) If it's a dial-up connection I'll use "rasdial" on the CMD Open up CMD, type "rasdial /?" (no quotes) to look for switches. $STDOUT_CHILD = 2 $o = Run(@ComSpec & " /c " & 'rasdial "Dialup profile name"', "","",$STDOUT_CHILD) $output = StdoutRead($o) ConsoleWrite($output) Edited April 4, 2010 by MiserableLife Link to comment Share on other sites More sharing options...
Sobiech Posted April 4, 2010 Author Share Posted April 4, 2010 If it's a dial-up connection I'll use "rasdial" on the CMD Open up CMD, type "rasdial /?" (no quotes) to look for switches. $STDOUT_CHILD = 2 $o = Run(@ComSpec & " /c " & 'rasdial "Dialup profile name"', "","",$STDOUT_CHILD) $output = StdoutRead($o) ConsoleWrite($output) This work very good for connect, but need something like this for disconnect ipconfig /relase doesnt work on my PC :f I have admin rights This world is crazy Link to comment Share on other sites More sharing options...
Sobiech Posted April 4, 2010 Author Share Posted April 4, 2010 (edited) This work very good for connect, but need something like this for disconnect ipconfig /relase doesnt work on my PC :fI have admin rightsEdit: Ok nevermind, You > /? > all Problem solvedEdit2: Omg i wanted to edit post, not quote xD Edited April 4, 2010 by Sobiech This world is crazy 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