24

I want to make a silent installation of Google Chrome Beta. I've tried invoking the ChromeSetup.exe downloader with /s or /-ms but nothing worked.

Then I've downloaded the standalone installation version, and tried the same, but got the same result – the silent installation doesn't work.

Basically what I need is to avoid the post-installation dialog ("Choose a search engine"). Is there a way to silently choose Google?

Ben N
  • 40,045
  • 17
  • 140
  • 181
Igal
  • 349
  • 1
  • 2
  • 4
  • Have a look at this http://www.techygeekshome.co.uk/2014/06/google-chrome-msi-download-silent.html which may help. – BDRSuite Apr 28 '15 at 19:09

10 Answers10

25
  1. Download the Chrome installer.

  2. Use the switches /silent and /install like so:

    chrome_installer.exe /silent /install
    
  3. Enjoy!

Oliver Salzburg
  • 86,445
  • 63
  • 260
  • 306
sunny
  • 251
  • 3
  • 2
  • Downloading the MSI in an unattended install process is a frigging pain, since it has a GUID attached to it's path to the MSI. This one is at least clean, and without a random generated GUID which timesout after a while and the download becomes unavailable. Thanks! – Hannibal Jul 15 '15 at 12:08
  • Tried this just now with the provided link but unfortunately it doesn't seem to work. – Almund Nov 09 '16 at 15:40
  • Works for me when installing Chrome 59.0.3071.86 using the standalone installer – HairOfTheDog Jun 30 '17 at 01:12
12

Installing with the MSI file with the q flag will give you a silent install.

David Cornish
  • 264
  • 2
  • 6
  • This wont' work on an older Windows XP machine without the SP to support msi installs. (And yes, I run into people with older machines all the time). – Clay Nichols Sep 07 '14 at 14:42
  • I'd understood Windows Installer 2 (which supports the q flag) to be included in RTM of XP, though I could be wrong. On the other hand - Chrome itself only supports [XP SP 2 and later](https://support.google.com/chrome/answer/95411) which seems to make it a little academic. – David Cornish Sep 08 '14 at 14:08
8

It is possible to silent install Chrome using Chocolatey.

Install Chocolatey

Open a commandprompt as an Administrator and issue:

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

Install Chrome

choco install googlechrome
030
  • 2,588
  • 8
  • 26
  • 40
6

For a setup file which has .msi extension:

msiexec /q /i GoogleChromeStandoloneEnterprise.msi

For detailed information, see this blog post.

slhck
  • 223,558
  • 70
  • 607
  • 592
cethint
  • 161
  • 1
  • 2
2

If only PowerShell 2.0 had a native one-line curl... For simplicity, I created my own, which takes a url and downloads the content. If you need basic auth, I've provided parameters for that too.

To get up and running:

  1. Load a PowerShell console
  2. Create a ps1, psm1 or simply copy and paste and execute this code block in PowerShell.
  3. The code will call Get-Url and silently execute chrome_installer.exe

NOTE: if you have any issues:

  • ensure you are running PowerShell in Administrator mode
  • C:\temp is an existing directory that you can access (or just change your $filePath)
# our curl command, with basic authentication if $credentials provided
function Get-Url {
    param(
        [string]$url, # e.g. "http://dl.google.com/chrome/install/375.126/chrome_installer.exe"
        [string]$filepath, # e.g. "c:\temp\chrome_installer.exe"
        [string]$credentials # e.g. "username:pass"
    )

    $client = New-Object System.Net.WebClient;

    if ($credentials) {
        $credentialsB64 = [System.Text.Encoding]::UTF8.GetBytes($credentials) ;
        $credentialsB64 = [System.Convert]::ToBase64String($credentialsB64) ;    
        $client.Headers.Add("Authorization", "Basic " + $credentialsB64) ;
    }    

    $client.DownloadFile($url, $filepath);
}

# curl and run silent install
Get-Url http://dl.google.com/chrome/install/375.126/chrome_installer.exe c:\temp\chrome_installer.exe ;
c:\temp\chrome_installer.exe /silent /install ;
sonjz
  • 392
  • 3
  • 12
1

Not sure if this is what you want, but:

choco install chrome

Jonathan
  • 1,678
  • 10
  • 28
  • 47
1

You can "silently install" Google Chrome on any modern Windows OS with the following Powershell one-liner:

$LocalTempDir = $env:TEMP; $ChromeInstaller = "ChromeInstaller.exe"; (new-object System.Net.WebClient).DownloadFile('http://dl.google.com/chrome/install/375.126/chrome_installer.exe', "$LocalTempDir\$ChromeInstaller"); & "$LocalTempDir\$ChromeInstaller" /silent /install; $Process2Monitor =  "ChromeInstaller"; Do { $ProcessesFound = Get-Process | ?{$Process2Monitor -contains $_.Name} | Select-Object -ExpandProperty Name; If ($ProcessesFound) { "Still running: $($ProcessesFound -join ', ')" | Write-Host; Start-Sleep -Seconds 2 } else { rm "$LocalTempDir\$ChromeInstaller" -ErrorAction SilentlyContinue -Verbose } } Until (!$ProcessesFound)

Well, technically it isn't an one-liner, but it works like it is. It will work even if IE Enhanced Security is turned on, thus making it very useful for Windows Server brand-new installations when IE will prevent you from downloading Chrome.

You can also read here for additional info.

Darkseal
  • 121
  • 3
  • Not a fan of the one liner, but I love this because it did exactly what I needed - installs chrome and waits for it to be fully installed before continuing. If only there was a simple /wait on the command line. – GilesDMiddleton Apr 13 '23 at 08:36
1

This works perfectly - tested on Windows 10 EDU 64 bit using PDQ Deploy on 10 laptops at once: Also works with the offline installer chromestandalonesetup.exe with tags /silent /install on PDQ Deploy

msiexec.exe /i "\\tabeguache\c$\PDQ Deploy Packages\googlechromestandaloneenterprise64.msi"  /quiet /passive 

I highly recommend installing the free PDQDeploy. Just download the MSI and enter the custom install command as above and choose the computers you want to install it on. It installs onto as many computers you want, 8 at a time queued, without having to touch the computer, whether anyone is logged on to the machine or not. If you also install PDQInventory you can install it onto all Domain workstations in surprisingly few clicks.

Ken Fry
  • 11
  • 1
0

Trying to install Google Chrome v42 via MSI was failing for me using the silent install commands in this post. When I ran the MSI manually, i found that it pops up a UAC prompt, and that the silent install was failing due to the UAC prompt being blocked.

This is a really good article explaining the relationship between MSI and UAC.

kenorb
  • 24,736
  • 27
  • 129
  • 199
Torstein
  • 61
  • 7
0

You need to use this command :

start /wait msiexec /i "%~dp0%googlechromestandaloneenterprise.msi%" /qn /l*

First download msi file.

For more information read this article

Máté Juhász
  • 21,403
  • 6
  • 54
  • 73
Klodi
  • 11
  • 1