E1M1 Posted September 13, 2010 Share Posted September 13, 2010 Is there better way than this to restart Local Area Connection? ShellExecute(@SystemDir&"\ncpa.cpl") WinWaitActive("Network Connections") Send("local") Sleep(100) Send("{enter}") WinWaitActive("Local Area Connection Status") Send("d") WinWaitActive("Network Connections") Send("{enter}") edited Link to comment Share on other sites More sharing options...
wakillon Posted September 13, 2010 Share Posted September 13, 2010 what do you want to do with your connection ? Perhaps is there another way than clicking... AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
E1M1 Posted September 13, 2010 Author Share Posted September 13, 2010 (edited) I want to restart because my computer wont connect to inet after standby. And this is what helps it. Edited September 13, 2010 by E1M1 edited Link to comment Share on other sites More sharing options...
HavikTech Posted September 13, 2010 Share Posted September 13, 2010 Not tested but i think this one should work: RunWait(@COMSPEC & " /c netsh interface set interface 'Local Area Connection' DISABLED") RunWait(@COMSPEC & " /c netsh interface set interface 'Local Area Connection' enable)") RunWait(@COMSPEC & " /c ipconfig /release") RunWait(@COMSPEC & " /c ipconfig /renew") RunWait(@COMSPEC & " /c ipconfig /flushdns") post results plz! Link to comment Share on other sites More sharing options...
E1M1 Posted September 14, 2010 Author Share Posted September 14, 2010 not working... i dont know why. I have tried that before...C:\Windows\system32>netsh interface set interface 'Local Area Connection' DISABLED"Area is not an acceptable value for admin.The parameter is incorrect.C:\Windows\system32> edited Link to comment Share on other sites More sharing options...
Authenticity Posted September 14, 2010 Share Posted September 14, 2010 RunWait(@COMSPEC & ' /c netsh interface set interface "Local Area Connection" disabled') RunWait(@COMSPEC & ' /c netsh interface set interface "Local Area Connection" enabled') RunWait(@COMSPEC & " /c ipconfig /release") RunWait(@COMSPEC & " /c ipconfig /renew") RunWait(@COMSPEC & " /c ipconfig /flushdns") Better suited for a batch file. E1M1 1 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