palotex Posted February 24, 2008 Share Posted February 24, 2008 hi, how to modify the propierties of the ethernet adapter? with ncpa.cpl you can open the Network conections, with all of them. But i only want open one, the ethernet. And then change the Macaddress, using "propierties" , then in tab General, use buttom configure, then pulse advanced, selecte network address, and change the value. with macrorecorder i get this: #region --- AutoIt Macro Generator V 0.21 beta --- Opt("WinTitleMatchMode", 4) WinWait("Local Area Connection Status","Connection") ControlClick("Local Area Connection Status","Connection","Button3") WinWait("Local Area Connection Properties","Connect using:") ControlClick("Local Area Connection Properties","Connect using:","Button1") $Tabhdl = ControlGetHandle("Local Area Connection Properties","Connect using:","SysTabControl321") ControlCommand("","",$Tabhdl,"TabRight","") WinWait("Marvell Yukon 88E8056 PCI-E Gigabit Ethernet Controller Properties","The following properties are a") WinWait("Marvell Yukon 88E8056 PCI-E Gigabit Ethernet Controller Properties","The following properties are a") ControlCommand("Marvell Yukon 88E8056 PCI-E Gigabit Ethernet Controller Properties","The following properties are a","ListBox1","SelectString","Network Address") ControlClick("Marvell Yukon 88E8056 PCI-E Gigabit Ethernet Controller Properties","The following properties are a","Edit1") ControlCommand("Marvell Yukon 88E8056 PCI-E Gigabit Ethernet Controller Properties","The following properties are a","Edit","Editpaste","1") ControlClick("Marvell Yukon 88E8056 PCI-E Gigabit Ethernet Controller Properties","The following properties are a","Button3") #endregion --- End --- But not works until i open manually the propierties window.... Any ideas?? I have code for change macaddress,but with reboot the machine. With the above option, not need to reboot Link to comment Share on other sites More sharing options...
palotex Posted February 24, 2008 Author Share Posted February 24, 2008 i find out this: Run("RunDll32.exe shell32.dll,Control_RunDLL ncpa.cpl") i can open the Networks Connections, but how i can select one of the three what i have,,, i try with controlfocus, controlsend.....and nothing please need help..... Link to comment Share on other sites More sharing options...
Kilhian Posted February 24, 2008 Share Posted February 24, 2008 (edited) ...You should rundos netsh command exemple: _rundos('netsh interface set address name="local network" source=static addr=10.0.5.99 mask=255.255.255.0 gateway=10.0.5.1') you just have to define: $ip $mask $gateway $dns Edited February 24, 2008 by Kilhian Link to comment Share on other sites More sharing options...
palotex Posted February 25, 2008 Author Share Posted February 25, 2008 You should rundos netsh command exemple: _rundos('netsh interface set address name="local network" source=static addr=10.0.5.99 mask=255.255.255.0 gateway=10.0.5.1') you just have to define: $ip $mask $gateway $dns with netsh you cannot change the macaddress....and this is my goal Link to comment Share on other sites More sharing options...
palotex Posted February 27, 2008 Author Share Posted February 27, 2008 fixed..... jejeje, i find out the solution thank you .... I post the code in example script 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