change LAN interface IP

Hi All.

Having a little issue here with a shell command I am running, to change the IP Address of my LAN automatically.

When I run any other command with my shell (ie: dir, netstat, etc) everything runs just fine.

However when I try to run
netsh interface ip set address name=“Local Area Connection” source=static addr= mask= gateway=

I get a shell timeout. I have increased the timeout to 5000 and it still happens.
Any ideas?


When you run it manually does it ask for a password ?

Hi Norman.

No it doesn’t… when I run it manually it just “goes”…


An update.

I think it might be a winDOZE command issue. Now when I run the program it tells me

is not an acceptable value for source.
if I try to set it to dhcp, that works fine!

I will keep digging and advise

Well figured it out…
(mumble grumble windows documentation… )


IF anyone needs this command, for your shell to change the IP address of your Local Area Connection, use:

s.Execute "netsh interface ip set address ""Local Area Connection"" static 1"

Hope this helps someone…