Oculusを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id Meta.Oculus -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Meta.Oculus -e --silentwinget uninstall --id Meta.Oculus -e --silentインストーラー別
64ビット · EXE · すべてのユーザー
サイレントインストール
setup.exe --unattended- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Oculus
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-oculus.ps1
$url = 'https://securecdn.oculus.com/binaries/download/?id=4281594222121950'
$sha256 = '7367AEB0E202B0A50976993FB2750E75A5215F9A0966FC8FB4E84807BA3B57F1'
$file = Join-Path $env:TEMP 'setup.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 '--unattended' -Wait