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=192.168.0.100 mask=255.255.255.0 gateway=192.168.0.1
I get a shell timeout. I have increased the timeout to 5000 and it still happens.
When you run it manually does it ask for a password ?
No it doesn’t… when I run it manually it just “goes”…
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 10.10.11.2 255.255.255.0 10.10.11.1 1"
Hope this helps someone…