CMake Silent Install (How-To Guide)

CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice. This article will serve as an informative guide and give you a clear understanding of how to perform a silent installation of CMake from the command line using the MSI installer.

How to Install CMake Silently

CMake 32-bit Silent Install (MSI)

  1. Navigate to: https://cmake.org/download/
  2. Select the Windows i386 MSI Installer of your choice
  3. Download the cmake-x.y.z-windows-i386.msi to a folder created at (C:\Downloads)
  4. Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
  5. Navigate to the C:\Downloads folder
  6. Enter the following command: MsiExec.exe /i cmake-x.y.z-windows-i386.msi /qn
  7. Press Enter

After a few moments you will find CMake entries in the Start Menu, Installation Directory, and Programs and Features in the Control Panel.

Software Title:CMake
Vendor:Kitware
Architecture:x86
Installer Type:MSI
Silent Install Switch:MsiExec.exe /i cmake-x.y.z-windows-i386.msi /qn
Silent Uninstall Switch:MsiExec.exe /x cmake-x.y.z-windows-i386.msi /qn
Repair Command:MsiExec.exe /fa cmake-x.y.z-windows-i386.msi /qn
Download Link:https://cmake.org/download/
PowerShell Script:https://silentinstallhq.com/cmake-install-and-uninstall-powershell/

CMake 64-bit Silent Install (MSI)

  1. Navigate to: https://cmake.org/download/
  2. Select the Windows x64 MSI Installer of your choice
  3. Download the cmake-x.y.z-windows-x86_64.msi to a folder created at (C:\Downloads)
  4. Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
  5. Navigate to the C:\Downloads folder
  6. Enter the following command: MsiExec.exe /i cmake-x.y.z-windows-x86_64.msi /qn
  7. Press Enter

After a few moments you will find CMake entries in the Start Menu, Installation Directory, and Programs and Features in the Control Panel.

Software Title:CMake
Vendor:Kitware
Architecture:x64
Installer Type:MSI
Silent Install Switch:MsiExec.exe /i cmake-x.y.z-windows-x86_64.msi /qn
Silent Uninstall Switch:MsiExec.exe /x cmake-x.y.z-windows-x86_64.msi /qn
Repair Command:MsiExec.exe /fa cmake-x.y.z-windows-x86_64.msi /qn
Download Link:https://cmake.org/download/
PowerShell Script:https://silentinstallhq.com/cmake-install-and-uninstall-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 a CMake Installation Log File

The CMake 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.

CMake 32-bit Silent Install (MSI) with Logging

MsiExec.exe /i cmake-x.y.z-windows-i386.msi /qn /L*v "%WINDIR%\Temp\CMake32-Install.log"

CMake 64-bit Silent Install (MSI) with Logging

MsiExec.exe /i cmake-x.y.z-windows-x86_64.msi /qn /L*v "%WINDIR%\Temp\CMake64-Install.log"

Change the CMake Default Installation Directory

You can also change the default installation directory by using the following command line parameters. In this example, I’m installing CMake to “C:\CMake”

MsiExec.exe /i cmake-x.y.z-windows-x86_64.msi INSTALL_ROOT=C:\CMake /qn

Create a CMake Desktop Shortcut During Install

The Cmake installer does not create a desktop shortcut by default. If you want the desktop shortcut, then you can run the following command line switches to include it.

CMake 32-bit Silent Install (MSI) with Desktop Shortcut

MsiExec.exe /i cmake-x.y.z-windows-i386.msi DESKTOP_SHORTCUT_REQUESTED=1 /qn

CMake 64-bit Silent Install (MSI) with Desktop Shortcut

MsiExec.exe /i cmake-x.y.z-windows-x86_64.msi DESKTOP_SHORTCUT_REQUESTED=1 /qn

Add CMake to System PATH

Add CMake to System PATH for All Users

MsiExec.exe /i cmake-x.y.z-windows-x86_64.msi ADD_CMAKE_TO_PATH=System /qn

Add CMake to System PATH for Current User

MsiExec.exe /i cmake-x.y.z-windows-x86_64.msi ADD_CMAKE_TO_PATH=User /qn

How to Uninstall CMake Silently

Check out the CMake Install and Uninstall (PowerShell) post for a scripted solution.

  1. Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
  2. Enter one of the following commands:
VersionCMake Silent Uninstall String
3.24.0 (32-bit)MsiExec.exe /x {4187D0E7-BFD9-4229-BE77-A695C3ECB46F} /qn
3.24.0 (64-bit)MsiExec.exe /x {EE0C6130-B202-471C-AFE6-27C0F4A3436A} /qn
3.23.2 (32-bit)MsiExec.exe /x {DF482CDD-35A0-4040-92B8-5A18CC4941F3} /qn
3.23.2 (64-bit)MsiExec.exe /x {DC0ADC08-FDB3-4D0F-B654-B7B8A5129ECC} /qn
3.23.1 (32-bit)MsiExec.exe /x {0FFA75E3-6977-4C3F-B7B8-B18617042E9D} /qn
3.23.1 (64-bit)MsiExec.exe /x {20931F1F-78FB-43BA-9D92-11722BCFF791} /qn
3.23.0 (32-bit)MsiExec.exe /x {20D41A75-CDBD-4C2F-8C3E-2770901FA9E8} /qn
3.23.0 (64-bit)MsiExec.exe /x {F5C1BA85-9C94-4A48-9A89-456AF398E5E0} /qn
3.22.5 (32-bit)MsiExec.exe /x {800DE457-FA9F-4454-A05B-76DEEBCFB26A} /qn
3.22.5 (64-bit)MsiExec.exe /x {25650F60-1D6F-4325-A84C-3BA9E8A56C27} /qn
3.22.4 (32-bit)MsiExec.exe /x {1CE670E2-F7E2-4354-94C7-0CA38DB4B5B6} /qn
3.22.4 (64-bit)MsiExec.exe /x {E728DBDF-A94C-4A01-92B3-BBCE6689EBFA} /qn
3.22.3 (32-bit)MsiExec.exe /x {5B94765B-626B-4088-A67E-CBFEAA051D42} /qn
3.22.3 (64-bit)MsiExec.exe /x {5909064C-54B8-45B0-A2EB-DBB2D5C5C7B1} /qn
3.22.2 (32-bit)MsiExec.exe /x {52063A8B-9814-4187-A01C-117926DB79D9} /qn
3.22.2 (64-bit)MsiExec.exe /x {55537FF7-1BD2-45BD-8C1B-199834F95C9B} /qn
3.22.1 (32-bit)MsiExec.exe /x {9B6EC79F-C050-4D1D-B88B-515797C572EF} /qn
3.22.1 (64-bit)MsiExec.exe /x {56AC6CFC-9BB1-4356-9B99-02C505CADD16} /qn
3.22.0 (32-bit)MsiExec.exe /x {1D9CD21F-FE8C-4EB2-9EAE-7E1E1D1B41F9} /qn
3.22.0 (64-bit)MsiExec.exe /x {35E797AC-1F61-498A-B953-0AF65C8B21E8} /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.

Jason Bergner

I am an accomplished Software Engineer at Patch My PC, leveraging more than 18 years of hands-on experience in Configuration Manager administration and application packaging. I am driven by a genuine passion for solving complex problems and consistently strive to discover innovative and effective solutions. Sharing my extensive knowledge of application deployments is a true joy for me, and I am honored to contribute to the community here at Silent Install HQ.

Recent Posts