Google Chrome

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search

Chrome is a web browser from Google.

You can download the current stable version in an MSI installer, Chrome for Business, for whichever operating system you're currently using from, or use the direct link to download the Windows version in particular from

From Wikipedia: "In December 2010 Google announced that to make it easier for businesses to use Chrome they would provide an official Chrome MSI package. For business use it is helpful to have full-fledged MSI packages that can be customized via transform files (.mst) - but the MSI provided with Chrome is only a very limited MSI wrapper fitted around the normal installer, and many businesses find that this arrangement does not meet their needs. The normal downloaded Chrome installer puts the browser in the user's local app data directory and provides invisible background updates, but the MSI package will allow installation at the system level, providing system administrators control over the update process — it was formerly possible only when Chrome was installed using Google Pack. Google also created group policy objects to fine tune the behavior of Chrome in the business environment, for example setting automatic updates interval, disable auto-updates, a home page and to workaround their basic Windows design flaws and bugs if it comes to roaming profiles support, etc. Until version 24 the software is known not to be ready for enterprise deployments with roaming profiles or Terminal Server/Citrix environments."

Google Chrome is only available as a 32-bit program on Windows, there is no 64-bit version.

Google Chrome Enterprise[edit]

The Google Chrome installer (chrome_installer.exe) installs per-user. To install it system-wide (into the %PROGRAMFILES% directory), use Chrome for Business (GoogleChromeStandaloneEnterprise.msi).

Chrome shows an unrelated product version in Uninstall Programs, so the package definition checks only that it is present and then checks the actual version against chrome.exe.

Chrome can be updated while it's running, but the changes won't happen until the running process is closed.

<?xml version="1.0" encoding="UTF-8"?>
    we use enterprise Chrome installer, which makes sane choices for most things
    the installer will run successfully whilst Chrome is running, installing to new_chrome.exe
    when the last running instance of Chrome exits, then:
    chrome.exe is renamed to old_chrome.exe
    new_chrome.exe is renamed to chrome.exe
    chrome installer log is at
<packages:packages xmlns:packages=""
    xmlns:wpkg="" xmlns:xsi=""
    xsi:schemaLocation=" xsd/packages.xsd">
        name="Google Chrome"
        <variable name="version" value="54.0.2840.59" />
         <variable name="PKG_DESTINATION"      value="%PROGRAMFILES%\Google\Chrome\Application" />
         <variable name="PKG_DESTINATION"      value="%PROGRAMFILES(x86)%\Google\Chrome\Application" architecture="x64"/>
        <!-- check the version no. to check the package state -->
        <check type="logical" condition="or">
            <check type="file" condition="versiongreaterorequal" path="%PKG_DESTINATION%\chrome.exe"     value="%version%" />
            <check type="file" condition="versiongreaterorequal" path="%PKG_DESTINATION%\new_chrome.exe" value="%version%" />
        <!-- install the software, fails if .msi is renamed -->
        <install cmd='msiexec /qn /norestart /i "%SOFTWARE%\chrome\GoogleChromeStandaloneEnterprise.msi"' />
        <!-- remove the desktop icon -->
        <install cmd='%COMSPEC% /c if exist "%public%\Desktop\Google Chrome.lnk" del "%public%\Desktop\Google Chrome.lnk"' />
        <!-- turn off AutoUpdate -->
        <install cmd='REG ADD HKLM\SOFTWARE\Policies\Google\Update /v AutoUpdateCheckPeriodMinutes /d 0 /f /t REG_DWORD' />
        <upgrade include="install" />
        <!-- kill chrome and all it's buddies -->
        <remove cmd="taskkill /F /IM chrome.exe"><exit code="any" /></remove>
        <!-- this is sometimes slow, but works, and does not rely on the original installer being available -->
        <remove cmd='wmic product where name="Google Chrome" call uninstall' />
        <remove cmd='REG DELETE HKLM\SOFTWARE\Policies\Google\Update /v AutoUpdateCheckPeriodMinutes /f' />


Disable Automatic Updates[edit]

See Auto-updates and Google Update for Enterprise.

Windows Registry[edit]

Update policy override policy[edit]

Prevent updates for specific application(s), using the "Update policy override" policy for that specific application, as defined by its <AppID> (Is there one ID for all versions of Chrome, or one for each version of Chrome?):


For example:


Update policy override default policy[edit]

Prevent any application that uses Google Update from being automatically updated, using the 'Update policy override default' policy:



Update policy override policy[edit]

    <package id="google-chrome-pol-no.update"
            name="Google Chrome (Policy) - Disable updates"

        <depends package-id="google-chrome"/>

        <variable name="PKG_KEY"           value="HKLM\SOFTWARE\Policies\Google\Update"/>

        <variable name="PKG_VALUE"         value="Update{4DC8B4CA-1BDA-483E-B5FA-D3C12E15B62D}"/>

        <variable name="PKG_DATA"          value="0"/>

        <check type="registry" condition="equals" path="%PKG_KEY%\%PKG_VALUE%" value="%PKG_DATA%" />

        <install cmd='reg add %PKG_KEY% /v %PKG_VALUE% /d %PKG_DATA% /t REG_DWORD /f'/>

        <upgrade include="install" />

        <remove cmd='reg delete %PKG_KEY% /v %PKG_VALUE% /f'/>

Note for Remote Desktop Services[edit]

Windows Server 2008 R2 has a new feature called Windows Installer RDS Compatibility. This feature is enabled by default when using Remote Desktop Services and will cause some MSI installers to hang. When run through WPKG the install process will appear to never finish. When run with the same parameters from a command-line you'll see a Windows Installer dialog that asks you to wait and a progress bar that repeatedly completes and restarts. To successfully install Chrome on an RDS server you need to configure it using either:

Windows Registry[edit]

Create a key to disable this feature:

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\Terminal Services\TSAppSrv\TSMSI\Enable=DWORD:0 

The keys TSAppSrv and TSMSI probably won't exist and need to be created.

Windows GUI[edit]

Start → control panel → install application on remote desktop → Browse to the MSI file listed above.

Start → Run → MMC.exe addin → Group Policy ObjectEditor \Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Application Compatibility – Turn off Windows Installer RDS Compatibility

Turn back on after you're done.

It is possible for this not to work if you changed the policy while it was installing saying "please wait..."; also, make sure users didn't install Chrome into their Windows profile (you can only see their Chrome in their own Add/Remove Programs).

Automated Updates of Chrome's WPKG Files[edit]

This is a VBScript we run on our WPKG server that downloads the current Chrome MSI, renames it according to the Chrome release number, and updates the package XML files accordingly. This greatly simplifies rolling out new versions of Chrome: we watch the Google Chrome Releases RSS feed, and anytime we see a stable channel update, we run our VBScript. It's been working since April, for Chrome releases 18 through 21.


' update-chrome.vbs -- stored in %SOFTWARE%\google-chrome
Option Explicit
Dim objFSO, objFile, strFileProperties, objShell, strChromePath, strChromeURL
Dim strVersion, objResult, strChromeFilename, objOleFile, arrComments
Dim strTemplateFilename, ForReading, ForWriting, strText
Dim strNewText

strChromePath = "L:\wpkg\software\google-chrome\"
strChromeFilename = "GoogleChromeStandaloneEnterprise.msi"
strTemplateFilename = "google-chrome-template.xml"
strChromeURL = "" & _

Set objShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objOleFile = CreateObject("DSOFile.OleDocumentProperties")

objShell.CurrentDirectory = strChromePath
' wget downloaded from
objResult = objShell.Run("wget --no-check-certificate " & strChromeURL, _
	1, True)
If objFSO.FileExists(strChromePath & strChromeFilename) Then
	' Grab version number. Requires Office installation, or DSOFile.dll
	' from
	objOleFile.Open(strChromePath & strChromeFilename)
	arrComments = Split(objOleFile.SummaryProperties.Comments, " ", 2)
	strVersion = arrComments(0)

	' Make a copy of the file
	Set objFile = objFSO.GetFile(strChromePath & strChromeFilename)
	objFile.Copy strChromePath & "GoogleChromeStandaloneEnterprise-" & _
		strVersion & ".msi", True
	' Delete the original file
	objFile.Delete True
	' Update package definitions
	updateXML strTemplateFilename, _
		"..\..\packages\google-chrome.xml" ' legacy tree
	updateXML strTemplateFilename, _
		"..\..\dev\packages\google-chrome.xml" ' dev tree
	updateXML strTemplateFilename, _
		"..\..\stable\packages\google-chrome.xml" ' stable tree
	MsgBox "Selected file does not exist!"
End If

Sub updateXML(strTemplateFilename, strPackageFilename)
	' Update package definition
	ForReading = 1
	ForWriting = 2
	Set objFile = objFSO.OpenTextFile(strTemplateFilename, ForReading)
	strText = objFile.ReadAll
	strNewText = Replace(strText, "__VERSION__", strVersion)

	Set objFile = objFSO.OpenTextFile(strPackageFilename, ForWriting)
	objFile.WriteLine strNewText
End Sub


Thie file generated from %SOFTWARE%\google-chrome\update-chrome.vbs and google-chrome-template.xml
Manual edits to packages\google-chrome.xml will be overwritten.
  name="Google Chrome"
  <variable name="version" value="__VERSION__" />
  <variable architecture="x86" name="progfiles" value="%PROGRAMFILES%" />
  <variable architecture="x64" name="progfiles" value="%PROGRAMFILES(X86)%" />
    path="Google Chrome" />
    value="%version%" />
  <install cmd="taskkill /F /IM chrome.exe">
    <exit code="any" />
  <install cmd='msiexec /qn /norestart /i "%SOFTWARE%\google-chrome\GoogleChromeStandaloneEnterprise-%version%.msi"' />
  <upgrade include='install' />
  <remove cmd="taskkill /F /IM chrome.exe">
    <exit code="any" />
  <remove cmd='msiexec /qn /x "%SOFTWARE%\google-chrome\GoogleChromeStandaloneEnterprise-%version%.msi"' />

--Mwr 17:05, 10 August 2012 (CEST)[edit]

Just to get an idea how this can be done using bash scripting if your wpkg share is on linux using samba, here is my script which checks if there is a newer version of google chrome. Only then it copies the msi file and creates new xml file from template. It substitutes the __VERSION__ and __MSIKEY__ strings, which are extracted from the msi file. Seems like a quick hack to get the strings out of the MSI file, at least it works at the moment.


# source:



rm $DLFILE.msi
/usr/bin/wget --no-check-certificate $DLSOURCE

RAWSTRINGS=`/usr/bin/strings $DLFILE.msi | /bin/grep -EC3 "^Installer$" | tr "\n" " " `

for k in ${RAWSTRINGS} ; do
    unset SUBSTRING1; unset SUBSTRING2 ;
    SUBSTRING1=`expr match "$k" '\([[:digit:].]\{12,16\}\)' `
    if [ -n "${SUBSTRING1}" ] ; then
for k in ${RAWSTRINGS} ; do
    SUBSTRING2=`expr match "$k" '{\([[:alnum:]-]\{36\}\)}' `
    if [ -n "$SUBSTRING2" ] ; then

echo Version: $GCVERSION
echo Key: $GCMSIKEY

    if [ -z "$GCVERSION" ] ; then
       echo no version found
       exit 2
# create xml file from template

sed -e "s/__VERSION__/${GCVERSION}/" <$TEMPLATE  | sed -e "s/__MSIKEY__/${GCMSIKEY}/"  >$TEMPFILE

diff -wB $TEMPLATE  $TEMPFILE >/dev/null

if [ $? -eq 0 ] ; then
    # version  not changed
    echo string error
    exit 1

diff -wB $TEMPFILE $DESTFILE >/dev/null

if [ $? -eq 0 ] ; then
    # no difference
    echo not newer
    rm $DLFILE.msi
    exit 0

   echo copying files


--Ftrojahn 12:09, 08 October 2013 (CEST)

External Links[edit]