/
chocolateyInstall.ps1
24 lines (21 loc) · 1.12 KB
/
chocolateyInstall.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$toolsPath = Split-Path $MyInvocation.MyCommand.Definition
. $toolsPath\helpers.ps1
$version = '108.0.5359.125'
if ($version -eq (Get-ChromeVersion)) {
Write-Host "Google Chrome $version is already installed."
return
}
$packageArgs = @{
packageName = 'googlechrome'
fileType = 'MSI'
url = 'https://dl.google.com/tag/s/dl/chrome/install/googlechromestandaloneenterprise.msi'
url64bit = 'https://dl.google.com/tag/s/dl/chrome/install/googlechromestandaloneenterprise64.msi'
checksum = '11f0529471734a1a108d54a5d8e517317861d460d06315d3fe659b037104fe04'
checksum64 = '254a5b8767656ad74cbb2c7a5444d8f3594fcf326659b0f6c6648d66b4706227'
checksumType = 'sha256'
checksumType64 = 'sha256'
silentArgs = "/quiet /norestart /l*v `"$($env:TEMP)\$($env:chocolateyPackageName).$($env:chocolateyPackageVersion).MsiInstall.log`""
validExitCodes = @(0)
}
if (Get-Chrome32bitInstalled) { 'url64bit', 'checksum64', 'checksumType64' | ForEach-Object { $packageArgs.Remove($_) } }
Install-ChocolateyPackage @packageArgs