Windows – How to programmatically change a static IP address

configurationip addresswindows

I have a box running windows which I want to assign a static IP to but give remote access to change that IP (without giving complete access to the windows instllation). I want to run a little app or command or something similar to connect to that machine and tell it to try and change it's IP address to a new value. If there are any problems with that, it should change itself back again after a timeout.

Is there any free software out there which will do the whole lot? ..or are there command line utilities I could wrap in a bit of Python? …or any other options?

Best Answer

I think the netsh utility may be what you need for this. Of course you can call that from within your own program/script. It's been quite a while since I used it so can't really remember the specifics.