I have a windows 10 laptop.
Some days a week I work from home, some others from office.
I created two batch scripts:
home.bat
[...]
netsh interface ip set address name="Ethernet" dhcp
[....]
office.bat
[...]
netsh interface ip set address name="Ethernet" source=static ^ address=10.10.10.26 mask=255.255.255.0 gate=10.10.10.254
[...]
Is there a simple way to merge these scripts in one script with the following logic:
<if connected to home network>
run home.bat
<else>
run office.bat