Perintah untuk menginstal GitHub CLI tanpa dialog, menghapusnya kembali, dan mendeteksinya dari alat deployment. Perintah hanya ditampilkan jika pasti benar: berasal dari manifest atau dari parameter bawaan yang terdokumentasi untuk teknologi installer tersebut.
Panduan terkait: Parameter instalasi senyap: MSI, NSIS, Inno Setup · Uninstall program lewat registry atau PowerShell
Dengan winget
PowerShell
winget install --id GitHub.cli -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id GitHub.cli -e --silentwinget uninstall --id GitHub.cli -e --silentPer installer
64-bit · MSI · Semua pengguna
Instalasi senyap
msiexec /i gh_2.103.3_windows_amd64.msi /qn /norestartTulis file log
msiexec /i gh_2.103.3_windows_amd64.msi /qn /norestart /l*v "%TEMP%\github-cli-install.log"Uninstall
msiexec /x {8B5049E4-77C4-4637-825C-77C6C1080778} /qn /norestart- Kode produk MSI
- {8B5049E4-77C4-4637-825C-77C6C1080778}
- Kunci registry uninstall
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{8B5049E4-77C4-4637-825C-77C6C1080778}
- UpgradeCode
- {8CFB9531-B959-4E1B-AA2E-4AF0FFCC4AF4}
- Folder instalasi
- %ProgramFiles%\GitHub CLI
64-bit · ZIP
Tanpa instalasi (portabel)
ARM64 · MSI · Semua pengguna
Instalasi senyap
msiexec /i gh_2.103.3_windows_arm64.msi /qn /norestartTulis file log
msiexec /i gh_2.103.3_windows_arm64.msi /qn /norestart /l*v "%TEMP%\github-cli-install.log"Uninstall
msiexec /x {356C78A3-D8F8-486A-B686-217AFBC67511} /qn /norestart- Kode produk MSI
- {356C78A3-D8F8-486A-B686-217AFBC67511}
- Kunci registry uninstall
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{356C78A3-D8F8-486A-B686-217AFBC67511}
- UpgradeCode
- {5D15E95C-F979-41B0-826C-C33C8CB5A7EB}
- Folder instalasi
- %ProgramFiles%\GitHub CLI
ARM64 · ZIP
Tanpa instalasi (portabel)
32-bit · MSI · Semua pengguna
Instalasi senyap
msiexec /i gh_2.103.3_windows_386.msi /qn /norestartTulis file log
msiexec /i gh_2.103.3_windows_386.msi /qn /norestart /l*v "%TEMP%\github-cli-install.log"Uninstall
msiexec /x {2643C99A-0858-411A-BD5A-BBF06DC0EF78} /qn /norestart- Kode produk MSI
- {2643C99A-0858-411A-BD5A-BBF06DC0EF78}
- Kunci registry uninstall
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{2643C99A-0858-411A-BD5A-BBF06DC0EF78}
- UpgradeCode
- {767EC5D2-C8F0-4912-9901-45E21F59A284}
- Folder instalasi
- %ProgramFiles(x86)%\GitHub CLI
32-bit · ZIP
Tanpa instalasi (portabel)
PowerShell: unduh, verifikasi, instal
Mengunduh file resmi, memeriksa SHA256-nya, lalu menginstalnya secara senyap.
install-github-cli.ps1
$url = 'https://github.com/cli/cli/releases/download/v2.103.3/gh_2.103.3_windows_amd64.msi'
$sha256 = '5073112B7ABB5FFBBA24B76AEE7E89269AF531218C0A42751F5F0BFB6440C2CC'
$file = Join-Path $env:TEMP 'gh_2.103.3_windows_amd64.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 install-github-cli.ps1
$url = 'https://github.com/cli/cli/releases/download/v2.103.3/gh_2.103.3_windows_arm64.msi'
$sha256 = '751F6CD2DAFFF9340822BF10C910F6DAEC3896638C030FCC8DDA8822129E4780'
$file = Join-Path $env:TEMP 'gh_2.103.3_windows_arm64.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 install-github-cli.ps1
$url = 'https://github.com/cli/cli/releases/download/v2.103.3/gh_2.103.3_windows_386.msi'
$sha256 = 'B98702030EF20FA21F17675A8D67C4343C284C69AC6D42C418806999B80C7FE5'
$file = Join-Path $env:TEMP 'gh_2.103.3_windows_386.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