أوامر لتثبيت برنامج Oracle Cloud Infrastructure CLI دون نوافذ أو أسئلة، ثم إزالته، والكشف عنه من أدوات النشر. لا يظهر الأمر إلا إذا كان مؤكدًا: من البيان (manifest) أو من الإعداد الافتراضي الموثّق لتقنية المثبّت.
شرح ذو صلة: أوامر التثبيت الصامت: MSI وNSIS وInno Setup · إزالة برنامج عبر السجل (Registry) أو 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