Oracle Cloud Infrastructure CLIを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id Oracle.OCI-CLI -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Oracle.OCI-CLI -e --silentwinget uninstall --id Oracle.OCI-CLI -e --silentインストーラー別
64ビット · MSI
サイレントインストール
msiexec /i oci-cli-3.95.0-Windows-Server-Installer.msi /qn /norestartログを出力
msiexec /i oci-cli-3.95.0-Windows-Server-Installer.msi /qn /norestart /l*v "%TEMP%\oracle-cloud-infrastructure-cli-install.log"アンインストール
msiexec /x {7C4749BB-5F03-4AE5-9B6C-E8DBC0036EFB} /qn /norestart- MSIプロダクトコード
- {7C4749BB-5F03-4AE5-9B6C-E8DBC0036EFB}
- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7C4749BB-5F03-4AE5-9B6C-E8DBC0036EFB}
- UpgradeCode
- {48B079F4-B598-438D-A62A-8A233A3F8901}
- インストール先フォルダー
- Lib
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-oracle-cloud-infrastructure-cli.ps1
$url = 'https://github.com/oracle/oci-cli/releases/download/v3.95.0/oci-cli-3.95.0-Windows-Server-Installer.msi'
$sha256 = '1A1BC73DAB9F84480D6404DDD266496B357C944D2AED7CCB1FEF9AC3F698CC91'
$file = Join-Path $env:TEMP 'oci-cli-3.95.0-Windows-Server-Installer.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait