shawnkhall/Tools

Ability to specify the Enterprise bundle (.zip) or the Enterprise Standalone Installer (.msi)

Closed this issue · 4 comments

Currently the script works really well at identifying the download details and associated useful info for various versions on the Chrome installer, so great work there.

However, the script only every returns the download urls for the standard installer chrome_installer.exe. Some of us will offline systems and specific requirements for .msi installers etc... would like to be able to specify that we need either:

  • Enterprise bundle (The usual filename being: GoogleChromeEnterpriseBundle64.zip)
    or
  • Enterprise Standalone Installer (The usual filename being: googlechromestandaloneenterprise64.msi)

I think this one thing that is missing which would take the script from useful to awesome!!

This isn't possible since the mechanism used is the same as the Google Chrome update checks. It doesn't provide the unique links to the standard installation packages (msi or bundles) because they're not exposed in a versioned way for this purpose.

That said, the static links can be obtained from the Chrome Enterprise installation page in the source of one of the JS files. They're included below for your reference:

Tag URL
WIN64_MSI https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise64.msi
WIN64_MSI_BETA https://dl.google.com/dl/chrome/install/beta/googlechromebetastandaloneenterprise64.msi
WIN_MSI https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise.msi
WIN_MSI_BETA https://dl.google.com/dl/chrome/install/beta/googlechromebetastandaloneenterprise.msi
WIN64_BUNDLE https://dl.google.com/dl/chrome/install/GoogleChromeEnterpriseBundle64.zip
WIN_BUNDLE https://dl.google.com/dl/chrome/install/GoogleChromeEnterpriseBundle.zip
MAC https://dl.google.com/dl/chrome/mac/universal/stable/gcea/googlechrome.dmg
MAC_DMG_BETA https://dl.google.com/dl/chrome/mac/universal/beta/GoogleChromeBeta-Enterprise.dmg
MAC_PKG https://dl.google.com/dl/chrome/mac/universal/stable/gcem/GoogleChrome.pkg
MAC_PKG_BETA https://dl.google.com/dl/chrome/mac/universal/beta/GoogleChromeBeta-Enterprise.pkg
ADMADMX https://dl.google.com/dl/edgedl/chrome/policy/policy_templates.zip
ADM https://dl.google.com/update2/enterprise/GoogleUpdate.adm
ADMX https://dl.google.com/dl/update2/enterprise/googleupdateadmx.zip
POLICY_DEV https://dl.google.com/chrome/policy/dev_policy_templates.zip
POLICY_BETA https://dl.google.com/chrome/policy/beta_policy_templates.zip

You could use the ChromeDownloader.ps1 script to obtain the version number then download the MSI and bundle files and store them with the version number as so:

$commonParams = @{ platform = 'win'; bits = 64; osversion = 10; do = 'pipeline' };
.\ChromeDownloader.ps1  @commonParams | ForEach-Object {
	Invoke-WebRequest -Uri "https://dl.google.com/dl/chrome/install/GoogleChromeEnterpriseBundle64.zip" -OutFile "GoogleChromeEnterpriseBundle64-$($_.version).zip"
	Invoke-WebRequest -Uri "https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise64.msi" -OutFile "googlechromestandaloneenterprise64-$($_.version).msi"
}

This does not guarantee that those files are actually the versions the script parses for though, since Google use staged releases on their end. This means that only some devices are given certain versions until a threshold is reached then the number is gradually increased. The msi and bundle files (and all other static links) could deliver any version they want and the only way to know is to download and check the version of the files you received.

Hi Shawn, thanks so much for the super quick response... I'm going to take a look trying that now.

As a side question - when you say '...static links can be obtained from the Chrome Enterprise installation page in the source of one of the JS files...' not being a expert with html/js web development generally, (more IAAS/IAC code Ansible/PowerShell etc).... how would I find said JS files from that page in order to interrogate them?

Once again, thank you so much

If you "view source" of the Chrome Enterprise page and scroll to the bottom you'll find several JavaScript files there that serve various purposes. One of them is currently this file which, if you un-minify it and search for the INSTALLER_PATH jsarray, shows the constants from the table above. The DOWNLOAD_HOST (domain name portion of the download URL) is a few lines higher in the source. There are several other values in that script that may be of interest including the size and descriptive names of different constants.

The difference between these links and the links that the ChromeDownloader.ps1 script downloads are that the links from the ChromeDownloader.ps1 are permalinks to a specific version: they will always provide the unique deep link to a specific version of the installation packages. The links in the table above will change on a whim by Google and may or may not at any moment be the same version that appears in the release notes or even be the same versions between the individual packages above. There's simply no way to know.

They can be used to provide static links if you're downloading updates on a regular basis and need to have them offline for your package cache or if you're doing a push for new installs, but not knowing what version they are makes them a liability if your goal is to ensure that you're running the current stable release.

Added in v3 with the -type switch. The previous caveats still apply: it's only capable of picking up current stable and beta versions (which means, not available for Chrome v109). However, you can now download bundles, msi, adm, admx, and pkg files with the -type switch.