Jump to content
Sign in to follow this  
palotex

Open to modify local area conection propierties

Recommended Posts

palotex

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

Share this post


Link to post
Share on other sites
palotex

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.....

Share this post


Link to post
Share on other sites
Kilhian

...

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 by Kilhian

Share this post


Link to post
Share on other sites
palotex

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

Share this post


Link to post
Share on other sites
palotex

fixed.....

jejeje, i find out the solution

thank you ....

I post the code in example script

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×