Changing Network Location

I want to create an AppleScript that changes my network location based on the network name detected by Airport.
Currently I have to open:
System > Network > Location
And select the Location I'm at (ie. Work or Home). I'm trying to automate this change as follows:
If Airport detects a network named "Work", automatically change my location to "Work".
If Airport detects a network named "Home", automatically change my location to "Home".
Any ideas?
PowerBook G4   Mac OS X (10.4.7)  

Take a look at this script described over on the MacOSXhints forum:
http://www.macosxhints.com/article.php?story=20060801081741437
TiBook 1GHz; Dual G4   Mac OS X (10.4.6)  

Similar Messages

  • Server 2012 R2 - Change network location from public to private

    I am having an issue with changing Network location to private from Public on Server 2012 R2 X64 .
    Please note all the reference for previous servers for fixing this issue  does not work on 2012 R2.
    I am using Static-IP and "Workgroup" as domain setting.
    In 2012 server by Right  clicking on Network and Turn sharing on or OFF worked but in 2012- R2 Right click is not working not providing turn sharing ON or OFF option.

    Check if you can change from here :
    Run -- Gpedit.msc-- Open Computer configration -->Windows Settings -->Security Settings -->select Network list manager policies
    Arnav Sharma |
    Facebook | Twitter Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other
    community members reading the thread.
    NO it did not work I had already tired and rebooted it does not work. Just for other having the same issue please note my Build is 9600 so this may not apply to you,if you have a different Build you might not have this problem.
    I am going back to server2012 rather using R2.

  • How do you change network location type on Server 2012?

    Within Network & Sharing Center there appears to be no options available to change a network type as you could do in Server 2012?
    Within Network List Manager policies everything is set to "not configured" so this should not be disabling any functionality.
    Thanks.

    Hi,
    Firstly, if the server is domain joined, when it starts to detect the network location, the machine will contact a DC via port 389. If this detection successful, it will get the domain profile. And we cannot change it.
    However, if the server is not domain joined, the domain was not found or process failed, NLA will let you to determine which firewall profile will be used, private or public.
    We can do this by referring to
    Turn sharing on or off or
    How to change network location type in Windows 8.
    Also we can refer to
    Network Location Awareness (NLA) and how it relates to Windows Firewall Profiles.
    All the above articles can apply to Windows Server 2012.
    Hope this helps.
    Jeremy Wu
    TechNet Community Support

  • Change network location on a domain controller

    This thing is driving me crazy. I have a virtual server with Windows Server 2012 R2. It has one NIC, which gets the internet address through the hosting company's dhcp. It is a public IP address. I've installed the Microsoft Virtual Network Adapter, which
    has a Static IP of 10.0.0.1. The server was upgraded to be a domain controller.
    Now the problem: it detects both networks as domain joined and puts them under the same domain profile of the firewall, although it should put NIC1 another the public profile, and NIC2 (the virtual one) under domain.
    I've tried every possible thing I could think of. Going through GPO's to change network location, then blocked everything on port 389 on the firewall, so he cannot find himself put the NIC under the domain (I actually tried blocking every outgoing and incoming
    connection on the firewall, it does not work), I even tried changing the registry. Nothing helps. It still puts the two cards under domain profile.
    Any ideas?

    Hi,
    Multi-homing a DC is not recommended.
    http://blogs.dirteam.com/blogs/acefekay/archive/2009/08/03/multihomed-dcs-with-dns-rras-and-or-pppoe-adapters.aspx
    There is a similar thread:
    Change network location on Domain Controller
    http://social.technet.microsoft.com/Forums/en-US/ba92eede-e0a4-4fa0-8b4f-f386a45558e0/change-network-location-on-domain-controller?forum=winserverDS
    Regards.
    Vivian Wang

  • Textedit and preview crashing in osx lion when changing network location

    I did upgrade to lion on launch and noticed that textedit and preview work quite well except when  changing network location: after a few seconds of spinning ball, both crash.
    Tried repairing permissions, deleting "containers" folders in my library and so on, without luck.
    Anyone is experiencing the same problem?
    This is an excerpt of the crash log:
    Process:         TextEdit [663]
    Path:            /Applications/TextEdit.app/Contents/MacOS/TextEdit
    Identifier:      TextEdit
    Version:         ??? (???)
    Code Type:       X86-64 (Native)
    Parent Process:  TextEdit [656]
    Date/Time:       2011-08-18 01:14:19.349 +0200
    OS Version:      Mac OS X 10.7.1 (11B26)
    Report Version:  9
    Interval Since Last Report:          7146 sec
    Crashes Since Last Report:           17
    Per-App Crashes Since Last Report:   15
    Anonymous UUID:                      5E6B69BE-D41B-45F4-BA5B-1DD8298A76AA
    Crashed Thread:  0  Dispatch queue: com.apple.main-thread
    Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x00000001c0a529a0
    VM Regions Near 0x1c0a529a0:
        MALLOC metadata        0000000108342000-0000000108343000 [    4K] rw-/rwx SM=PRV 
    -->
        MALLOC_TINY            00007fc808c00000-00007fc808f00000 [ 3072K] rw-/rwx SM=COW 
    Application Specific Information:
    objc[656]: garbage collection is OFF
    *** multi-threaded process forked ***

    UPDATE 2: I'm having this issue both on my iMac and my Macbook, so I suppose it's a lion bug and not simply something related to something that went wrong during the update (permissions or something like this). It's both in 10.7 and 10.7.1.
    I'm going to try on my wife's Macbook to see if it's something related to some software or setting I'm using; in the meanwhile, can someone out there try to reproduce this issue? Just open textedit and change the network location from the menu bar (you should create one other than "automatic" for  "locations" to show up just below "dock"): at this point you should get the spinning ball and then a window telling you that textedit just crashed. Try to do a couple of times if it doesn't crash the first one.
    BTW I noticed that textedit doesn't crash if you have the network preference pane open and active ("system preferences" showed on the menu bar) and change the location from the menu bar.
    I think I'm going to give a call to Applecare to see if there's some plan to get this corrected in some next update.

  • IPad sync hangs after changing Network Locations

    I have a problem where often after I change Network Locations, the next iPad sync will hang in Step 1 of 5 with the progress right under the "e" of Step.
    I have let it sit there for hours and it never progresses. I try to eject the iPad, it will never eject it.
    I have sort of a formula to recover from this.
    * I have to just disconnect the USB cable from the Mac.
    * I shut down iTunes.
    * I reboot the computer.
    * I try to power off the iPad by holding down both buttons.
    * It will hang for ever with the little spinning thing going in the middle of the screen.
    * I will hold down the both buttons again and it will finally power off the iPad.
    * I boot the iPad again.
    * I bring up iTunes on the Mac and connect the USB cable and let it try to sync.
    * This will fail the first time on Step 5 of 5 with the message "iTunes could not back up the iPad "My's iPad" because an error occurred. OK.
    * I click OK.
    * I eject the iPad.
    * I shutdown iTunes and bring it back up.
    * I plug the iPad back in to the MacBook Pro.
    Now the iPad will sync and continue to sync normally unless I change my network "Location". Once I change my Network Location there is some probability that iTunes and the iPad will get into this stuck condition.
    I've looked at the main console logs and All Messages. I don't see anything obvious.
    Is anyone else seeing this behavior?
    Does anyone have some hints about how to debug this?
    -- Ed

    Hi,
    Tap Settings / General / Reset / Reset Network Settings.
    See if that helps...
    Carolyn

  • Help with script to eject an external drive and change Network Location?

    Hello,
    Could someone help me with a script that would do the following:
    -eject an external hard drive call "1TB_BU"
    -change the Network System Preferences Location from "Work" to "Home"
    I then need another that would change the Location from "Home" to "Work"
    THx!
    ~Von

    1. Use the following:
    tell application "Finder"
    eject disk "1TB_BU"
    end tell
    2. Click here for information.
    (35975)

  • Changing Network Locations under a restricted/managed account.

    I am an IT administrator at a company that now has OS X Leopard laptops that are being used both on our network and outside our network. The user has a restricted account but does not have Parental Controls enabled. The restricted user account can not change locations with out supplying an administrator password. Is there a way for a restricted user to change their Network Location (it works in Tiger)?

    The account is not an administrator account. Therefore they do not have write access outside their home directory. The effect of that is they can not install applications and can not change some preferences.
    +..."In 10.5, as in earlier versions of OS X, switching between pre-configured network "Locations" via the "Apple Menu" should not require authentication"...+
    I have not looked into changing Locations via the Apple Menu, only through the Network menu in System Preferences. I'll give that a try tomorrow morning and get back with you.

  • Crashing changing network locations

    I get a system crash every time I change my Network Location. Is this a known problem? I am forced to pull the plug to reboot. This only seems to happen if the computer has slept. Until then the Locations prefpanel works fine.

    Repair permissions on your disk from the Mac OS X install disk.

  • Freeze when I change Network locations

    Every time I use the "Apple" menu to switch network locations, my Mac freezes. The only way to get it running is to pull the plug. is this normal?
    Is there some way to remove this item from the list so I am not forced to reboot and lose all my work?
    When I boot it back up, about 10 windows open that should have been closed days ago. Is this normal?

    Hi all, I had the same problem and I experimented a little bit around it. I came up with the following observations.
    1) If the MBP is connected to airport and airport IS responding, no matter how many times you put it to sleep it will never freeze coming back to the network --> it's not just sleeping
    2) If it is on airport when put it to sleep and it wakes up in a different environment (i.e. LAN via ethernet) it freezes, but
    3) when you restart it after 2) it restarts with the old airport settings, and if now you switch onto LAN ethernet it won't freeze -->it's not just switching
    4) if it is on airport and you switch onto ethernet while STILL being in the airport covered area it won't freeze either, even if the ethernet connection is not available --> it is the combination of loosing the connection while sleeping
    5) if it is on ethernet, and it wakes up after sleeping, into a new area with airport but without ethernet it never freezes --> it is unidirectional, i.e. airport to ethernet while sleeping = freeze ethernet to airport = no freeze, irrespective of having been asleep
    (My) conclusion: there is some bug when it tries to put down a previously active network connection via airport when airport is not responding anymore
    (my) solution: switch onto ethernet before you put it into sleep and before leaving the airport covered area, and it won't freeze any longer.
    Hope this helps....
    Ciao
    Adriano

  • Network location and apple script

    Hi,
    I have a strange problem... When I try to use this AppleScript to change network location in Leopard, nothing happens:
    tell application "System Events"
    tell network preferences
    get properties
    --> returns: {current location:location id "51BD3FB7-50D1-4859-9649-9138E7FF1ECA" of network preferences, class:network preferences object}
    get the name of every location
    --> returns: {"Automatic", "Sprint Card"}
    set current location to location "Automatic"
    end tell
    end tell
    This is copy-pasted from <http://www.apple.com/applescript/features/system-prefs.html>. I have 3 locations set: home, office and Automatic. I'm currently using home, and this script just silently fails to set the location to Automatic... Any thoughts/hints?

    That works, thanks!
    I'm still wondering why "pure" AppleScript solution proposed by Apple is not working?

  • Every time I want to download itunes 11, I keep getting a network error. I have tried changing my location but every time, I get a network error. I have been able to install itunes 10.7 without a problem. How do I fix this?? Help!!

    I recently updated my ipod to iOS 7. Now that I have done this, my itunes needs to be itunes 11. I have been able to download itunes 10.7 but now I need an upgrade. Every time I go to update it, I get a "Failed-Network Error" message. I have tried changing my location and networks but I still get the same message. I really need to download itunes 11 inorder for my ipod to work with the itunes. How do I fix this problem?? Help!!!

    I had the same problem and tried restarting my computer. It configured windows updates for a while, then iTunes downloaded successfully. Hope this helps!

  • Leopard hard crash on Network Location change

    When I try to change my network location from the Apple menu, occasionally (like once in approx. 20 changes) Mac OS will crash. It's a hard crash, meaning no menus, no mouse, no nothing. It just simply and fully hangs, and I have to hold the power button down to restart. These seems pretty harsh and I almost never crash.
    Generally speaking (though not repeatable) it seems to happen when I come into the office, after having been on my home wireless network. shut the lid, go to work, flip it open, Mac automatically jumps on work wireless. I then go to apple menu > location > choose the LAN wired network and that's when it hangs.
    On a MacBook Pro, 10.5.2. Wireless at home is 802.11g, same as work.

    Hi Gary;
    This is a problem that has been ongoing, no relief yet. Here's the latest and second thread that David Villeneuve started that might give you more info if you haven't already found it.
    http://discussions.apple.com/thread.jspa?threadID=1329965&start=0&tstart=0
    Original thread that philgmo started in Nov. 2007:
    http://discussions.apple.com/thread.jspa?threadID=1222395&start=0&tstart=0
    Mike

  • How to change the Network Location without admin right?

    How to allow an normal user to change their network location without adminstrator rights? Thanks

    You can't, unless you change your user rights to Admin.  Now, you can reset all the passwords and admin through a reset process, but if this is a corporate owned Mac, you could get in trouble.  Even fired.  If it's your parent's Mac, then just get them to give you admin rights.

  • Manage-bde command is not generating recovery key on network location

    Hi,
    I am trying to save the recovery key to the network share location and start up key in the USB drive while enabling bit locker.When the OS drive gets encrypted, the default folder for recovery password shows that it contains 1 file but not getting anything
    inside it when i checked the properties of the folder.
    i have already changed the group policy as "choose default folder for recovery password".
    I am using the command to enable the bit-locker as "manage-bde.exe -on C: -rk
    <network location to save recovery key> -sk <location of the USB drive>
    -rp to enable the bit-locker. It is generating the start up key in the USB but not the recovery key on network share.
    Can anyone suggest what i am missing or what else i should do to generate the recovery key on network share.
    Does manage-bde process be able to save the recovery key on network share or it hand over to some other process to perform this task.
    Thanks
    Gaurav Ranjan

    I got you Manoj, but I want to ask you one think that what if i lost the startup  key or my USB stick. I have my recovery key on the network share.  In order to log-in my machine I need the recovery password. From where i will get the recovery
    password(48 digit). Surely from the recovery key on the network share. So how can i get the recovery password if only we have the recovery key.
    I know both are different in context. Both are two different thing. I have lost my USB stick along with the recovery password and I have to log-in my machine. How can i do that i want to know that. Do there is any method to get recovery password from the
    recovery key on network share. I have retrieved the recovery password when the recovery key in AD. But this time it is on network share.
    Also one think which I need to solve is that the manage-bde -protectors -add command creates a new .bek file along with the older one. So the .bek file which get shown at the time of the start up of the machine is different from that stored in the network.
    So i am getting confused as which .bek file is for which machine and hard to retrieve the password.
    Is there any method to store recovery key on network without the -protectors -add command line so that both the .bek file should be matched and can easily be known for indiviual machine in an OU. As if both the .bek files will be different it would be difficult
    to to retrieve the recovery password for the machines.
    Please do inform if you need some more information about the scenario if i missed something.
    Thanks
    Gaurav Ranjan

Maybe you are looking for

  • Numbers (or Pages) Template Cannot Be Opened From Outside the Application

    Ever since the upgrade to Mavericks, I cannot open a Numbers (or Pages) template without being asked..... Do you want to add this custom template to the Template Chooser?  Then my only options are Cancel or Add to Template Chooser. If I cancel, it wo

  • How to open your Photoshop Touch project file in Photoshop

    How to open your Photoshop Touch project file in Photoshop When your files are stored in the Creative Cloud, you can access them on your mobile device using Adobe Photoshop Touch, or on your desktop computer using Adobe Photoshop. Photoshop Touch can

  • SQL Query Assistance Required for Full Outer Join

    Hi, Lets say I have two tables, i.e: TAB_A (colA1, colA2, colA3, colA4) TAB_B (colB1, colB2, colB3, colB4) where colB2 is a FK to colA1 I am after an SQL query that will cater for both the following two scenarios. Scenario 1: TAB_A has two rows of da

  • WebLogic Crash! SIGBUS Error.

              Hi,           I just wanted to share a problem that we faced when we hosted our           application on Weblogic. About ten users were logged onto the Unix           Box(RAM 1 GB, CPU 1 400 MHZ,HD 70 GB).           Suddenly the AppServer(w

  • Macbook Pro (mid 2012) inbuilt Track pad behaving erratically after fresh install of Yosemite 10.10.2

    I recently did a fresh install of the OS from online recovery. Mountain Lion was installed which I immediately upgraded to Yosemite 10.10.2. The trackpad started behaving erratically after two days. I seems that it started since I plugged one of my w