Tag Archives: chrome auto updates

macOS: Enable Chrome Auto Updates For All Users

Meant to be run after installing Chrome for the first time on a machine to enable auto updates for all users. Creates the /Library/Google/GoogleSoftwareUpdate folder, including “TicketStore“. Then registers the system for autoupdates.

Before running, /Library/Google/GoogleSoftwareUpdate doesn’t exist


Run the script with Sudo to install to the system wide location at /Library/Google instead of the user location at ~/Library/Google.

 sudo chrome_enable_autoupdates.rb

After running, the folder and ticket store are created


. To check settings after running:

  • Open Chrome
  • Click on Chrome in upper left menu bar
  • Click on “About Google Chrome“
  • Check update settings

The bulk of the work is done by the KSADMIN command to register a keystone ticket and check for updates. Full script can be found here.

  def self.keystone_register
          command = [
             "'#{KSADMIN}'",
             "--register",
             "--productid",          "'#{product_id}'",
             "--version",            "'#{chrome_version}'",
             "--xcpath",             "'#{CHROMEPATH}'",
             "--url",                "'#{update_url}'",
             "--tag-path",           "'#{TAGPATH}'",
             "--tag-key",            "'#{TAGKEY}'",
             "--brand-path",         "'#{BRANDPATH}'",
             "--brand-key",          "'#{BRANDKEY}'",
             "--version-path",       "'#{VERSIONPATH}'",
             "--version-key",        "'#{VERSIONKEY}'",
       "--system-store",
             "2>/dev/null"]
          system("#{command.join(" ")}")
     end

Enable Chrome Auto Updates For All Users

chromeautoupdates.png

One of the consent post deployment tasks is to open Chrome and click the box that says “Setup Automatic Updates”. About a year and a half ago I found “chrome-enable-autoupdates.py” by Hannes Juutilainen. It’s been a life saver. One less thing to think about. I use the script in my DeployStudio workflow, after I install chrome.

For some reason last week it failed. I logged into the desktop and ran the script and it ran fine, but the script gave me some feed back that the “Trusted user setting is deprecated”.

What changed?

Well Chrome. I was deploying Chrome 54 with the script and no issues. I updated my workflow to deploy Chrome 56 and now it fails. I suspect there are back end changes in chrome that happened to “ksadmin”, found at “/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/MacOS/ksadmin”, that generated the message. Since it’s not well documented and I can’t find anything useful for the error message, I decided to look at the script myself. I suspect the script fails in DeployStudio because the exit code isn’t 0 since a warning message is returned.

I decided to rewrite the “chrome-enable-autoupdates.py”, but in Ruby.

Screen Shot 2017-02-08 at 6.19.49 PM.pngIt was a great exercise to not only deconstruct the script and understand what’s going on. Once I got the script working, I got the same warning message. The easiest solution is redirect the output of the commands to /dev/null. Then the script runs without issues.

Is it a work around? Yep. How long will it work? No idea. But now that I created my own script I feel I have a better handle on troubleshooting it, and I hope in the future versions of Chrome there is a resolution.

You can get the script on my GitHub.