Possible Duplicates:
Can the built-in OS X “Location” feature auto select locations based on wireless networks?
Can I automate location changing so I don't have to drive the choice manually?
Start/stop internet sharing from a script?
Is it possible in Mac OS X to somehow make it change the network location from a custom location profile to automatic when leaving the home network without having to manually adjust the settings in system preferences?