Download Older Version of Google Chrome using Powershell

Google doesn’t provide links to the older versions of Chrome, once the new versions are released, so you need to either have a copy of the installers or browse around looking for legitimate links.

TL;DR

You can get links to the older version of Chrome using Google Update API. Using this method, you can go around 11 versions back (1 year).

Powershell code for Windows 64-bit (change chrome version to number to the desired version).

 

$ChromeVersion = '115'
$requestId = ([String][Guid]::NewGuid()).ToUpper()
$sessionId = ([String][Guid]::NewGuid()).ToUpper()
$xml = @"
<?xml version="1.0" encoding="UTF-8"?>
<request protocol="3.0" updater="Omaha" updaterversion="1.3.36.111" shell_version="1.3.36.111"
    ismachine="1" sessionid="{$sessionId}"
    installsource="update3web-ondemand" requestid="{$requestId}"
    dedup="cr" domainjoined="0">
    <hw physmemory="4" sse="1" sse2="1" sse3="1" ssse3="1" sse41="1" sse42="1" avx="1" />
    <os platform="win" version="10.0" sp="" arch="x64" />
    <app appid="{8A69D345-D564-463C-AFF1-A69D9E530F96}" version="5.0.375" nextversion=""
        ap="x64-stable-statsdef_0" lang="" brand="GCEB" client="" installage="0">
        <updatecheck targetversionprefix="$ChromeVersion"/>
    </app>
</request>
"@

$webRequest = @{
    Method    = 'Post'
    Uri       = 'https://tools.google.com/service/update2'
    Headers   = @{
        'Content-Type' = 'application/x-www-form-urlencoded'
        'X-Goog-Update-Interactivity' = 'fg'
    }
    Body      = $Xml
}
$result = Invoke-WebRequest @webRequest -UseBasicParsing
$contentXml = [xml]$result.Content
$status = $contentXml.response.app.updatecheck.status
if ($status -eq 'ok') {
    $package = $contentXml.response.app.updatecheck.manifest.packages.package
    $urls = $contentXml.response.app.updatecheck.urls.url | ForEach-Object { $_.codebase + $package.name }
    Write-Output "--- Chrome Windows 64-bit found. Hash=$($package.hash) Hash_sha256=$($package.hash_sha256)). ---"
    Write-Output $urls
}
else {
    Write-Output "Chrome not found (status: $status)"
}

Powershell script to discover links for Mac and Windows 32-bit is here.

How it works

I captured the Chrome conversation with the update server using Fiddler.

The browser asks https://tools.google.com/service/update2 server for the latest version of Chrome.

 

摘自:https://squirrelistic.com/blog/how_to_download_older_version_of_google_chrome

发表评论

您的电子邮箱地址不会被公开。 必填项已用 * 标注

滚动至顶部