أوامر لتثبيت برنامج stgit دون نوافذ أو أسئلة، ثم إزالته، والكشف عنه من أدوات النشر. لا يظهر الأمر إلا إذا كان مؤكدًا: من البيان (manifest) أو من الإعداد الافتراضي الموثّق لتقنية المثبّت.
شرح ذو صلة: أوامر التثبيت الصامت: MSI وNSIS وInno Setup · إزالة برنامج عبر السجل (Registry) أو PowerShell
حسب المثبّت
64 بت · MSI
التثبيت الصامت
msiexec /i stgit-2.7.0.msi /qn /norestartكتابة ملف سجل
msiexec /i stgit-2.7.0.msi /qn /norestart /l*v "%TEMP%\stgit-install.log"PowerShell: تنزيل وتحقق وتثبيت
ينزّل الملف الرسمي، ويتحقق من بصمة SHA256، ثم يثبّته تثبيتًا صامتًا.
install-stgit.ps1
$url = 'https://github.com/stacked-git/stgit/releases/download/v2.7.0/stgit-2.7.0.msi'
$sha256 = 'DEEBF4DB69C6C135BABD8E692577B962DE3C52EBAA93D3B9BE4178FECD0E1BAE'
$file = Join-Path $env:TEMP 'stgit-2.7.0.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