Create an AppleScript GUI to set a local Software Update server

A little while back, I blogged about the Terminal commands you can use to set a local Apple Software Update server on your client machines. Obviously, there are many advantages to this, including faster package downloads and the ability to prevent bad or undesirable updates from being installed too soon. However, in this day and age, many users have laptops or Minis that often travel away from the network on which your local server resides. For this reason, it can be helpful to have a simple program that users can run to set their update server to either Apple’s default, or your own local update box. That way, if they can’t reach your server for one reason or another (like a firewall), they can always get critical updates from Apple. Here’s the AppleScript:

display dialog "Set Update Server" buttons {"Cancel", "Apple", "Local"} default button 3
if the button returned of the result is "Local" then
do shell script "defaults write /Library/Preferences/ CatalogURL"
do shell script "defaults delete /Library/Preferences/ CatalogURL"
end if

Just substitute the URL of your local update server where it says You can test that it works by choosing your local server with your new GUI, then running Software Update. The window should read Software Update ( If you set it back to the default, it should just read Software Update again.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.