LoginSignup
98
36

More than 3 years have passed since last update.

悲しいとき~ 悲しいとき~ Chrome をインストールするために Edge や IE を起動するとき~

Last updated at Posted at 2020-07-06

そんなとき,あるよね?

ということで, Microsoft Edge や Internet Explorer を使わずに Google Chrome をダウンロードするスクリプトを書きました.日本語以外をご希望の方は lang を変更, Google に使用状況を送信したい方は usagestats1 に変更してください.

chrome.ps1
$params = New-Object 'System.Collections.Generic.Dictionary[string,string]'

$params.Add('appguid', '{8A69D345-D564-463C-AFF1-A69D9E530F96}')
$params.Add('iid', '{7D7CAAF6-0F7A-3989-07FA-2A8380D458D2}')
$params.Add('lang', 'ja')
$params.Add('usagestats', '0')
$params.Add('ap', 'x64-stable-statsdef_1')
$params.Add('installdataindex', 'empty')

$tag = $params.Keys | % {'{0}={1}' -f $_, $params[$_]} | Join-String -Separator '&'
$url = 'https://dl.google.com/tag/s/{0}/update2/installers/ChromeSetup.exe' -f [System.Web.HttpUtility]::UrlEncode($tag)
$output = '{0}\ChromeSetup.exe' -f $env:TEMP

Write-Output $url
Invoke-WebRequest -Uri $url -OutFile $output

& $output

2020 年 7 月 6 日現在動作を確認していますが, Google 側の仕様変更により使えなくなる可能性があります.
あらかじめご了承ください.

ワンライナースクリプト

この記事からコピペするためにブラウザが必要だということに気づいてしまったので,すぐ使えるよう Vercel でホストさせました.

PowerShell
iwr setups.now.sh/chrome.ps1 | iex
98
36
8

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
98
36