Posted on 07-05-2016 03:54 PM
Hello JN,
I am struggling to find a way to update iLife Suite apps. I found this: https://acdesigntech.wordpress.com/2013/03/06/disable-mac-app-store-receipts-to-reenable-downloaded-update-packages/
I tested the method mentioned and it does indeed take the apps out of the scope of Software Update in the App Store and eliminate having to touch each machine with an AppleID and password (cool!).
Now, I just cannot seem to find any way to update from the command line similar to this one: sudo softwareupdate -iav which I run in a script after image.
What are all of you doing to keep these up to date automatically-either at image time or continuously? I would rather not have to package with composer overtime there is an update from Apple?
I am aware of VPP and have that in process. Outside of that, what other options are there?
TIA,
/randy
Solved! Go to Solution.
Posted on 07-07-2016 12:25 PM
Hi Randy
Give the mas command a try:
This will make you very happy. Something like this works fine:
#!/bin/sh
# 20160628 - 05:52 - tobiaslinder
# Apple Store Credentials
id=yourAppleID
psswd=yourAppleIDPassword
############################ NO CHANGES AFTER THIS LINE ############################
# Signout Apple ID
/usr/local/mas/mas signout
sleep 5
# Signin Apple ID
/usr/local/mas/mas signin $id $psswd
sleep 5
# Install GarageBand
/usr/local/mas/mas install 682658836
sleep 5
# Install iMovie
/usr/local/mas/mas install 408981434
sleep 5
# Signout Apple ID
/usr/local/mas/mas signout
exit 0
Posted on 08-22-2016 08:26 AM
@Randydid the number appears in the link to the application in the App Store. If you click the disclosure triangle next to Install in the App Store, it will allow you to Copy Link. If you paste that link you will see the number. For instance, the link for GarageBand is https://itunes.apple.com/us/app/garageband/id682658836?mt=12 and the 682658836 is the numerical ID for GarageBand. There is probably other ways to get the ID that's just the one I typically use.
Posted on 07-05-2016 03:57 PM
Posted on 07-07-2016 12:25 PM
Hi Randy
Give the mas command a try:
This will make you very happy. Something like this works fine:
#!/bin/sh
# 20160628 - 05:52 - tobiaslinder
# Apple Store Credentials
id=yourAppleID
psswd=yourAppleIDPassword
############################ NO CHANGES AFTER THIS LINE ############################
# Signout Apple ID
/usr/local/mas/mas signout
sleep 5
# Signin Apple ID
/usr/local/mas/mas signin $id $psswd
sleep 5
# Install GarageBand
/usr/local/mas/mas install 682658836
sleep 5
# Install iMovie
/usr/local/mas/mas install 408981434
sleep 5
# Signout Apple ID
/usr/local/mas/mas signout
exit 0
Posted on 07-07-2016 12:40 PM
I second looking at deploying and using the mas command line tool. Its quite cool and may allow you to do exactly what you;re looking for. Just so you know, typically App Store apps can't be updated or installed without entering your password. Hence why @tobiaslinder's script above needs to log out of MAS, and then back in. It kind of gets around the issue. You might want to consider storing the account and password details in script parameters rather than hardcoded into the script though.
Posted on 07-07-2016 09:34 PM
Hi @mm2270 Good point to put the login info into the parameters. Thanks!
Posted on 07-08-2016 01:52 PM
Very cool! Thanks for this.
I am not certain I really want Brew on my image, Can I just use something like Composer and drop the binary in /usr/local/mas/ capture it and push?
Thanks again!
/randy
Posted on 07-08-2016 02:05 PM
Can I just use something like Composer and drop the binary in /usr/local/mas/ capture it and push?
Totally! I didn't use brew to install it. The github page has precompiled binaries. Just download, add into a usual location like /usr/local/, package up and deploy away!
Posted on 07-08-2016 04:08 PM
Mind blown....I cant wait to use this.
Posted on 07-08-2016 08:04 PM
@boberito same here! We would really love to use VPP device based assignment but as long as this works so unreliable on OSX the mas command is really a lifesaver when you have to update Pages, Keynote, Numbers etc.
Posted on 07-21-2016 11:53 AM
Followup: My script and policy are firing off perfectly. On certain machines, it completes but when I look at "Show" I see it actually is failing with:
Script result: The operation couldn’t be completed. (MASErrorDomain error 6.)
Any ideas why?
/randy
Posted on 07-22-2016 06:43 AM
Hi @Randydid I see the same error with two clients and will the others not. This is so weird. Can't tell you at the moment what is going wrong here.
With best regards, Tobias Linder
Posted on 08-22-2016 08:10 AM
This is working very well for me. I have just one final question: Where/how do you find the Application number shown in the script above?
TIA,
/randy
Posted on 08-22-2016 08:26 AM
@Randydid the number appears in the link to the application in the App Store. If you click the disclosure triangle next to Install in the App Store, it will allow you to Copy Link. If you paste that link you will see the number. For instance, the link for GarageBand is https://itunes.apple.com/us/app/garageband/id682658836?mt=12 and the 682658836 is the numerical ID for GarageBand. There is probably other ways to get the ID that's just the one I typically use.
Posted on 08-22-2016 08:49 AM
@mpermann Thanks!
/randy
Posted on 01-12-2017 03:51 PM
This solution has been working for some time however, it appears to be hanging more often lately. Is it possible something has changed on the Apple Side?
/randy