System Administration Uncategorized

Save Installer From Mac App Store (Updates and New Apps)

If you are an OS X administrator and deploy apps or updates, having a .pkg format is very useful.  Wouldn’t it be nice to save the installer from the App Store?

By default, any new apps or updates magically appear in the /Applications  folder.  In the background, however, there is actually a .pkg being run by Installer.  There is an manual way to capture and save the .pkgs from the App Store, but I wanted to write  script that would do this automatically.

I was able to automate a big chunk of it.  You will still need to open the App Store and pause any downloads you want to save.  But once you do that, just run the script and it will save each .pkg to your downloads folder with a name like _MAS_1.pkg , _MAS_2.pkg , etc.

You can view the full source code on Github, but the gist of it, is below.

Eventually, I would like to be able to attach this script to a Folder Action, so that anytime a new file is added, this script would run automatically.

3 replies on “Save Installer From Mac App Store (Updates and New Apps)”

Hmm…the link is bad. I wonder if I accidentally deleted the repo. I’ll see if I can dig the code up and then update the link.

Leave a Reply