If you’re an IT sysadmin and would like to automagically ensure that Chrome auto-updates itself for all users on a machine, you can do so with this simple ruby script:
Regular users with administrative privilege can do this without a script just by clicking on “Chrome->About Google Chrome” and then following the button prompts. If you see nothing indicating that you should enable auto-updates, then it’s already done. Chrome does nag you to do this when you first use it.
If you’re using munki to deploy packages I recommend adding this script as a post-install script. You could also run it on clients using Apple Remote Desktop. For the curious, a more detailed explanation on what this script does after the jump.
This script installs/registers Google’s Keystone daemon, which controls the updating process via the KeystoneRegistration.framework, and then registers Chrome with Keystone.
Every version of Google Chrome comes with a copy of the KeystoneRegistration.framework. So since the latest version at the time of writing this is 19.0.1084.46, I would use the Keystone script inside the 19.0.1084.46 folder inside the Google Chrome.app:
cd "/Applications/Google Chrome.app/Contents/Versions/19.0.1084.46/Google Chrome Framework.framework/Frameworks/KeystoneRegistration.framework/Resources/"
sudo ./install.py --install=Keystone.tbz --root=/
The “–root=/” specifies that we want Chrome to be able to be updated system-wide. Otherwise the argument would look like “-root=/Users/joeblow”, and then Chrome could only auto-update when joeblow was logged in.
Registering Chrome with Keystone
The ksadmin command requires alot of arguments, way too many. I’m pretty sure it’s breaking some sort of record:
sudo ./ksadmin --register --preserve-tttoken --productid com.google.Chrome --version 19.0.1084.52 --xcpath "/Applications/Google Chrome.app" --url https://tools.google.com/service/update2 --tag-path "/Applications/Google Chrome.app/Contents/Info.plist" --tag-key KSChannelID --brand-path "/Library/Google/Google Chrome Brand.plist" --brand-key KSBrandID --version-path "/Applications/Google Chrome.app/Contents/Info.plist" --version-key KSVersion
Original credit for the auto-update script goes to Hannes Juutilainen. I simply just rewrote it ruby.