E1M1 8 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 Share this post Link to post Share on other sites
wakillon 403 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 Share this post Link to post Share on other sites
E1M1 8 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 Share this post Link to post Share on other sites
HavikTech 0 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! Share this post Link to post Share on other sites
E1M1 8 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 Share this post Link to post Share on other sites
Authenticity 13 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. 1 E1M1 reacted to this Share this post Link to post Share on other sites