Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm administering several computer labs using software from the Mac App Store. Is there any way to apply software updates from the command line (via Remote Desktop), instead of having to go around to each workstation and launch App Store.app?

share|improve this question
1  
There's a similar question at Ask Different, but it doesn't mention anything useful at the moment. –  Lri Jun 23 '12 at 11:06

2 Answers 2

There doesn't appear to be a command line helper or any scriptable cocoa classes you can latch on to for automation. Unlike the overall software update, you can only script the process of clicking buttons with a mouse.

If someone is logged into the mac (windowmanager is running), you can use Automator and the "watch me do" function to automate updates and storing your store password in the script fairly insecurely.

Here are two tutorials to get you started if this meets your needs.

http://www.tuaw.com/2009/01/19/mac-automation-creating-watch-me-do-workflows/

http://automator.us/leopard/features/virtual-user.html

Once you have a working script, you can use the command line open command to kick it off.

If the App Store app ever exposes that function to scripting you will have more options from the command line. It would be easy to use sdef, sdp and gen_bridge_metadata to dump the entire scriptable dictionary and script things using ruby from the command line, but at present, this is a non-starter.

share|improve this answer
    
Darn. Leaving workstations unattended while logged in as administrator (while updates are running via the Automator process you described) won't work for me — these computer labs allow 24-hour access, and that would present a security risk. Thanks for the suggestion, though — I didn't know about "watch me do". –  smokris Jun 23 '12 at 4:21
1  
Filed a Radar; cross-posted to Open Radar: openradar.appspot.com/radar?id=1786409 –  smokris Jun 28 '12 at 13:40

To list available updates:

$ sudo softwareupdate -l

To update all software:

$ sudo softwareupdate -i -a

To update only NAME:

$ sudo softwareupdate -i NAME
share|improve this answer
3  
No, the softwareupdate tool doesn't handle Mac App Store software updates. –  smokris Apr 4 '13 at 21:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.