Tell me more ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I would like to force an update of App Store applications from the command line.

How can I do this? Please provide working solution.

share|improve this question
2  
There doesn't appear to be a command line helper like the overall software update so you may be limited to launching a script that will automate the GUI commands. Would you edit the question to clarify if you expect the "working" solution to be a terminal only or if an Automator script that will key in your password when asked is what you are looking for. – bmike May 9 '11 at 14:58
I am looking for something unattended, still if this requires the AppleID id/password I find ok to include it in the script. – Sorin Sbarnea Nov 28 '12 at 18:33

1 Answer

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
1  
Wow, this is really annoying. The usual software updates are easily scriptable using softwareupdate(8). – Arne Dec 6 '11 at 8:09
2  
I just wanted to state for the record - It's clear Apple has consciously decided to make it hard / not provide any tool or hook or assistance for automating App Store installs and updates. The core system still has the softwareupdate process and it even hooks into the App Store on Mountain Lion - but it's only for non App Store apps. – bmike Nov 28 '12 at 17:47

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.