Deployment Script: Google Chrome Enterprise 65.156.32827

Topics: Archive - Deployment Scripts
Dec 2, 2013 at 8:45 PM
Google Chrome allows you to set policies to control the defaults for the installation. You used to be able to just set the registry keys and be done but I guess that was not secure enough. so now you actually need to set the policies. This script installs Google Chrome Enterprise 65.156.32827 and then applies a GPOpack to set the desired local settings.

Uninstalls older MSI Versions of Chrome Enterprise
Sets local policies for Chrome
    This script performs the installation or uninstallation of an application(s).  
    The script is provided as a template to perform an install or uninstall of an application(s). 
    The script either performs an "Install" deployment type or an "Uninstall" deployment type.
    The install deployment type is broken down in to 3 main sections/phases: Pre-Install, Install, and Post-Install.
    The script dot-sources the AppDeployToolkitMain.ps1 script which contains the logic and functions required to install or uninstall an application.
    To access the help section,
    Deploy-Application.ps1 -DeploymentType "Silent"
    Deploy-Application.ps1 -AllowRebootPassThru -AllowDefer
    Deploy-Application.ps1 -Uninstall 
.PARAMETER DeploymentType
    The type of deployment to perform. [Default is "Install"]
    Specifies whether the installation should be run in Interactive, Silent or NonInteractive mode.
    Interactive = Default mode
    Silent = No dialogs
    NonInteractive = Very silent, i.e. no blocking apps. Noninteractive mode is automatically set if an SCCM task sequence or session 0 is detected.
.PARAMETER AllowRebootPassThru
    Allows the 3010 return code (requires restart) to be passed back to the parent process (e.g. SCCM) if detected from an installation. 
    If 3010 is passed back to SCCM a reboot prompt will be triggered.
Param (
    [string] $DeploymentType = "Install",
    [string] $DeployMode = "Interactive",
    [switch] $AllowRebootPassThru = $false

Try {

# Variables: Application

$appVendor = "Google"
$appName = "Chrome"
$appVersion = "65.156.32827"
$appArch = ""
$appLang = "EN"
$appRevision = "01"
$appScriptVersion = "1.0.0"
$appScriptDate = "12/02/2013"
$appScriptAuthor = "Joseph Noxon"

# Variables: Script - Do not modify this section

$deployAppScriptFriendlyName = "Deploy Application"
$deployAppScriptVersion = "3.0.7"
$deployAppScriptDate = "10/24/2013"
$deployAppScriptParameters = $psBoundParameters

# Variables: Environment
$scriptDirectory = Split-Path -Parent $MyInvocation.MyCommand.Definition
# Dot source the App Deploy Toolkit Functions


If ($deploymentType -ne "uninstall") { $installPhase = "Pre-Installation"

    # Show Welcome Message, close Chrome if required
    Show-InstallationWelcome -CloseApps "Chrome" -silent

    # Show Progress Message (with the default message)

    Remove-MSIApplications "Google Chrome"
    Remove-MSIApplications "Google Update Helper"

$installPhase = "Installation"

    # Perform installation tasks here
    Execute-MSI -Action Install -Path "GoogleChromeStandaloneEnterprise.msi"

$installPhase = "Post-Installation"

    # Perform post-installation tasks here
    New-Item $envWindir\Installer\GoogleSettings -ItemType directory
    Copy-Item -Path "$dirSupportFiles\GoogleSettings" -Destination "$envWindir\Installer" -Recurse
    Execute-Process -FilePath "$envWindir\System32\cscript.exe" -Arguments "$envWindir\Installer\GoogleSettings\GPOPack.wsf /silent" -WindowStyle Hidden -WorkingDirectory "$envWindir\Installer\GoogleSettings"

} ElseIf ($deploymentType -eq "uninstall") { $installPhase = "Uninstallation"

    # Show Welcome Message, close Chrome if required
    Show-InstallationWelcome -CloseApps "Chrome" -silent

    # Show Progress Message (with the default message)

    # Perform uninstallation tasks here
    Execute-MSI -Action Uninstall -Path "{51020C27-7422-3FBE-9480-4CB1CCC8E2CC}"

} } Catch {$exceptionMessage = "$($_.Exception.Message) `($($_.ScriptStackTrace)`)"; Write-Log "$exceptionMessage"; Show-DialogBox -Text $exceptionMessage -Icon "Stop"; Exit-Script -ExitCode 1} # Catch any errors in this script 
Exit-Script -ExitCode 0 # Otherwise call the Exit-Script function to perform final cleanup operations
To create the GPO Pack use LocalGPO:

The Chrome ADM extensions can be located here:

Once you have installed Chrome on a clean system (no local GPOs) import the ADM files and set the local policies how you want to set them. then export to a GPOPack for easy installation later.
Dec 3, 2013 at 6:17 PM
Great job! :)
Dec 5, 2013 at 1:45 PM
Can I humbly ask, where are you seeing Google Chrome (Enterprise or otherwise) as version 65.156.32827? Currently I see a much lesser version 31.0.1650.63, noted on the msi, and on the About after install... What am I missing? Are regions different or something? Thanks!
Dec 5, 2013 at 9:13 PM

When I check the app in the Control Panel-->Programs and Features, That is what was listed after an MSI only install.

I get the same lower version from opening Chrome and checking "About Google Chrome" I don't know why it is like that but I usually pull the version from the uninstall key, so that's why I have it listed as that version.
Dec 5, 2013 at 9:20 PM
Ahh, gotcha...yea, same on mine. But even the chrome.exe itself has the 31.xxxxx version, not the 65.xxxxxxx....goofy. I've always used the msi details version and/or the exe version, never noticed the programs/features uninstall version might be different. Thanks for the clarification, I was highly does't jsut make up a version like that. :)
Dec 6, 2013 at 8:20 PM
Thanks for the heads up about LocalGPO.msi. That's going to save my bacon for some time to come.