Hello people,
i have made this .bat few years ago and its working fine for changing gateway
getaway 192.168.1.1
@echo off
netsh interface ip set dns name="Local Area Connection" source=static addr=192.168.1.1
netsh interface ip set address name="Local Area Connection" source=static addr=192.168.1.11 mask=255.255.255.0 gateway=192.168.1.1 gwmetric=0
exit
getaway 192.168.1.5
@echo off
netsh interface ip set dns name="Local Area Connection" source=static addr=192.168.1.5
netsh interface ip set address name="Local Area Connection" source=static addr=192.168.1.11 mask=255.255.255.0 gateway=192.168.1.5 gwmetric=0
exit
My question is:
How to port this to C# code?
Thanks in advance
Happy new year all