Scenario: W7 laptop that in the office is joined to a domain with a static I.P. address, but everywhere else needs DHCP.
What is the best approach for (hopefully during start up) to determine which network configuration to use? I have used batch scripts to manually change the net configuration like:
netsh interface ipv4 set address name="Ethernet" source=static address=xx.xxx.xxx.xxx mask=255.255.255.0 gateway=xx.xxx.xxx.xxx
netsh interface ipv4 set dnsservers name="Ethernet" source=static address=xx.xxx.xxx.xxx primary
netsh interface ipv4 add dnsserver name="Ethernet" address=xx.xxx.xxx.xxx index=2
However, I would like a more intelligent approach. Any suggestions?