Mozilla Firefox (ff)を確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id Mozilla.Firefox.ff -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Mozilla.Firefox.ff -e --silentwinget uninstall --id Mozilla.Firefox.ff -e --silentインストーラー別
64ビット · EXE(NSIS) · すべてのユーザー
サイレントインストール
"Firefox Setup 160.0.1.exe" /S /PreventRebootRequired=trueインストール先を指定
"Firefox Setup 160.0.1.exe" /S /PreventRebootRequired=true /D=C:\Apps\mozilla-firefox-ff- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Mozilla Firefox
ARM64 · EXE(NSIS) · すべてのユーザー
サイレントインストール
"Firefox Setup 160.0.1.exe" /S /PreventRebootRequired=trueインストール先を指定
"Firefox Setup 160.0.1.exe" /S /PreventRebootRequired=true /D=C:\Apps\mozilla-firefox-ff- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Mozilla Firefox
32ビット · EXE(NSIS) · すべてのユーザー
サイレントインストール
"Firefox Setup 160.0.1.exe" /S /PreventRebootRequired=trueインストール先を指定
"Firefox Setup 160.0.1.exe" /S /PreventRebootRequired=true /D=C:\Apps\mozilla-firefox-ff- アンインストール用レジストリキー
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Mozilla Firefox
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-mozilla-firefox-ff.ps1
$url = 'https://download-installer.cdn.mozilla.net/pub/firefox/releases/160.0.1/win64/ff/Firefox%20Setup%20160.0.1.exe'
$sha256 = 'C4051F62F43ADBE8D6A3DD9190721F47E549E696503A61CD22E09312B9E30558'
$file = Join-Path $env:TEMP 'Firefox Setup 160.0.1.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/S /PreventRebootRequired=true' -Wait install-mozilla-firefox-ff.ps1
$url = 'https://download-installer.cdn.mozilla.net/pub/firefox/releases/160.0.1/win64-aarch64/ff/Firefox%20Setup%20160.0.1.exe'
$sha256 = 'BE4834B3CC078839F158AD862ED9EF264437DC282862A8D63DFEAFC236C8FFFD'
$file = Join-Path $env:TEMP 'Firefox Setup 160.0.1.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/S /PreventRebootRequired=true' -Wait install-mozilla-firefox-ff.ps1
$url = 'https://download-installer.cdn.mozilla.net/pub/firefox/releases/160.0.1/win32/ff/Firefox%20Setup%20160.0.1.exe'
$sha256 = '9712C47E326869EE9FF4848E6C24E775C0C79243783C6636908F7B3666F7595C'
$file = Join-Path $env:TEMP 'Firefox Setup 160.0.1.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/S /PreventRebootRequired=true' -Wait