I need a (WSH) script that clients can execute on their machines themselves and with a minimum of hassle and without me requiring any special privileges. The script should take the existing IP address, subnet mask and default gateway of the ethernet adapter and set these as static parameters. I also need a script to be able to undo this. I have figured out how to set the parameters manually on the command line using the netsh command i.e.
netsh.exe interface ip set address {Interface} static {IP} {SUB} {DEF} 1
However I suspect that this could be done automatically with a WSH script. The clients are either XP/Vista/Windows 7. What would be the best way to accomplish this?
