GitHub CLI Silent Install (How-To Guide)

GitHub CLI is a command-line tool that brings pull requests, issues, GitHub Actions, and other GitHub features to your terminal, so you can do all your work in one place. This article will serve as an informative guide and give you a clear understanding of how to perform a silent installation of GitHub CLI from the command line using the MSI installer.

How to Install GitHub CLI Silently

GitHub CLI Silent Install (MSI)

  1. Navigate to: https://github.com/cli/cli/releases/latest
  2. Download the gh_x.y.z_windows_amd64.msi to a folder created at (C:\Downloads)
  3. Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
  4. Navigate to the C:\Downloads folder
  5. Enter the following command: MsiExec.exe /i gh_x.y.z_windows_amd64.msi /qn
  6. Press Enter

After a few moments you will find GitHub CLI entries in the Installation Directory and Programs and Features in the Control Panel.

Software Title:GitHub CLI
Vendor:GitHub, Inc.
Architecture:x64
Installer Type:MSI
Silent Install Switch:MsiExec.exe /i gh_x.y.z_windows_amd64.msi /qn
Silent Uninstall Switch:MsiExec.exe /x gh_x.y.z_windows_amd64.msi /qn
Repair Command:MsiExec.exe /fa gh_x.y.z_windows_amd64.msi /qn
Download Link:https://github.com/cli/cli/releases/latest
PowerShell Script:https://silentinstallhq.com/github-cli-install-and-uninstall-powershell/
Detection Script:https://silentinstallhq.com/create-a-custom-detection-script-for-github-cli-powershell/

The information above provides a quick overview of the software title, vendor, silent install, and silent uninstall switches. The download links provided take you directly to the vendors website. Continue reading if you are interested in additional details and configurations.


Additional Configurations

Create an Installation Log File

The GitHub CLI installer offers the option to generate a log file during installation to assist with troubleshooting should any problems arise. You can use the following commands to create a verbose log file with details about the installation.

GitHub CLI Silent Install with Logging (MSI)

MsiExec.exe /i gh_x.y.z_windows_amd64.msi /qn /L*v "%WINDIR%\Temp\GitHubCLI-Install.log"

How to Uninstall GitHub CLI Silently

Check out the following posts for a scripted solution:

GitHub CLI Install and Uninstall (PowerShell)
GitHub CLI Silent Uninstall (PowerShell)
  1. Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
  2. Enter one of the following commands:
VersionGitHub CLI Silent Uninstall String
2.14.3MsiExec.exe /x {5787E29A-8403-4428-8333-D5BD2B155C20} /qn
2.14.2MsiExec.exe /x {FD839A1A-FEFD-4436-825F-FC3EDB09ECC0} /qn
2.14.1MsiExec.exe /x {C46BF491-D804-4695-867D-554A899E3C31} /qn
2.14.0MsiExec.exe /x {EF7E4F22-3391-43B1-B121-0572BE909B94} /qn
2.13.0MsiExec.exe /x {E4A3080C-0E6C-441F-8293-A61ED0B79C75} /qn
2.12.1MsiExec.exe /x {260FF05E-B80A-49D4-AAE7-7E76995692CB} /qn
2.12.0MsiExec.exe /x {5AAD7018-EC34-4E7D-9139-DEEC894D83B1} /qn
2.11.3MsiExec.exe /x {68D93873-D711-4D3F-9D34-3EC1C2F3E2D2} /qn
2.11.2MsiExec.exe /x {356212D8-DB80-4C49-8C2C-28CC2FEE7661} /qn
2.11.1MsiExec.exe /x {B1E80266-DE58-4062-A385-4A148BF56BE6} /qn
2.11.0MsiExec.exe /x {69E1881F-DBFB-4334-96FE-8792BB482F52} /qn
2.10.1MsiExec.exe /x {6E9B412F-42F0-4819-BDFF-3BFE1A28F531} /qn
2.10.0MsiExec.exe /x {7BF0501B-9614-4E4E-AD32-09DBE1CBC034} /qn
2.9.0MsiExec.exe /x {8EEB8B5B-F261-476D-B228-022C703CCBF6} /qn
2.8.0MsiExec.exe /x {C58F74EB-9AD1-4D01-BD0B-B77D553D7F34} /qn
2.7.0MsiExec.exe /x {B8AE579D-4F69-4A1E-9472-A12B929ACD3F} /qn
2.6.0MsiExec.exe /x {B5B40F36-65F7-4206-9B00-B8D473C9CAEF} /qn
2.5.2MsiExec.exe /x {CD9B83A6-8529-4ABA-B9DA-938C3EDBDF6F} /qn
2.5.1MsiExec.exe /x {062231BF-4087-46C0-8594-FEA5E05AB974} /qn
2.5.0MsiExec.exe /x {25C819AA-71AF-4D7A-A5EE-7774B3E5DA29} /qn
2.4.0MsiExec.exe /x {AF18E63F-0BA8-4D31-A480-82033CEB1FCC} /qn
2.3.0MsiExec.exe /x {1E497751-7A4E-4C32-A332-DCAB727BC089} /qn
2.2.0MsiExec.exe /x {FFC8847D-596C-4736-9CB3-36882120D768} /qn
2.1.0MsiExec.exe /x {7B2B5232-3377-484A-BF8F-CE09AAEEF48E} /qn
2.0.0MsiExec.exe /x {9D2DB17D-1F8D-48B5-8FD1-A9C0DE14976B} /qn
1.14.0MsiExec.exe /x {8E002431-24B5-4DEB-B175-17D6A74D5574} /qn
1.13.1MsiExec.exe /x {194E4F87-A59B-4AA1-B175-2DAF2152C7BA} /qn
1.12.1MsiExec.exe /x {C7B57338-8235-4A98-9542-3B31005A5926} /qn
1.12.0MsiExec.exe /x {99A4D2AB-7EB8-48EB-AF53-CEA93FDF0D4A} /qn
1.11.0MsiExec.exe /x {3BE5325F-4514-4D14-BF04-9BC7039E312B} /qn
1.10.3MsiExec.exe /x {0EC3621B-F804-4480-BF78-6C8D12A46D02} /qn
1.10.2MsiExec.exe /x {98975229-8B11-48B0-9B85-1C3EBD349315} /qn
1.10.1MsiExec.exe /x {20930863-77A1-41B4-90A8-1EE33A201A04} /qn
1.10.0MsiExec.exe /x {E6AFDEB0-B162-4024-B8A8-D3ACCA596630} /qn
1.9.2MsiExec.exe /x {F74F2123-FB6F-4983-BB93-AAD08A0F8E05} /qn
1.9.1MsiExec.exe /x {B37A1DCF-344F-47E9-8F5D-30DAE8C25C89} /qn
1.9.0MsiExec.exe /x {B88B61BE-30C9-46B4-8295-04F5D470E28D} /qn
1.8.1MsiExec.exe /x {AA034C20-8EFE-4520-8360-E395C987C580} /qn
1.8.0MsiExec.exe /x {1E2907DD-7ECF-46DC-A55A-B403D03EE3A8} /qn
1.7.0MsiExec.exe /x {390527D5-9CA6-472A-8BC5-DD938DFB7A5D} /qn
1.6.2MsiExec.exe /x {776052B2-954D-4B0C-B7FC-A4336E07D0E0} /qn
1.6.1MsiExec.exe /x {55A671B0-49DF-4C3F-819F-4722F585DADE} /qn
1.6.0MsiExec.exe /x {A687B01A-113A-48AF-911B-F66BD2873D6B} /qn
1.5.0MsiExec.exe /x {3CDC7D34-BB1B-4C92-BB72-A085F06D37DF} /qn
1.4.0MsiExec.exe /x {6B10EA1B-8E30-4661-9295-872B94E3A881} /qn
1.3.1MsiExec.exe /x {220131F0-CD9E-4C59-88B6-5E0B60DF0417} /qn
1.3.0MsiExec.exe /x {3317E4B6-D2A0-488C-BE87-2CAC3E7CC4C6} /qn
1.2.1MsiExec.exe /x {092E1A5A-2A12-4224-B0B6-50CBF47B2C2B} /qn
1.2.0MsiExec.exe /x {997872F8-860D-407F-A48E-7833DBA3648A} /qn
1.1.0MsiExec.exe /x {3A0738B7-C165-4524-A29E-DDB25A55FEE2} /qn
1.0.0MsiExec.exe /x {572E09C7-2623-4E9E-9542-8037C0D93C25} /qn

Always make sure to test everything in a development environment prior to implementing anything into production. The information in this article is provided “As Is” without warranty of any kind.