# Failed to install CMake 3.31 on Windows 10, 64-bit

**URL:** https://discourse.cmake.org/t/failed-to-install-cmake-3-31-on-windows-10-64-bit/12875
**Category:** Usage
**Tags:** os:windows
**Created:** [October 31, 2024, 1:37pm UTC](https://discourse.cmake.org/t/failed-to-install-cmake-3-31-on-windows-10-64-bit/12875 "2024-10-31T13:37:30Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![8Observer8](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/8/bbe5ce/32.png) [@8Observer8](https://discourse.cmake.org/u/8Observer8)
#### Post date: [October 31, 2024, 1:37pm UTC](https://discourse.cmake.org/t/failed-to-install-cmake-3-31-on-windows-10-64-bit/12875/1 "2024-10-31T13:37:30Z")

</div>

Hello,

I have CMake 3.27 that I have installed using Qt’s installer. Now I want to installe the latest CMake 3.31. But I have the following error. Maybe someone had the same error and solved it:

![image](https://discourse.cmake.org/uploads/default/original/2X/6/62590ecbd60b1371a00853e6833ad36c23063251.png)

---

<div class="post-metadata">

### Author: ![8Observer8](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/8/bbe5ce/32.png) [@8Observer8](https://discourse.cmake.org/u/8Observer8)
#### Post date: [October 31, 2024, 1:39pm UTC](https://discourse.cmake.org/t/failed-to-install-cmake-3-31-on-windows-10-64-bit/12875/2 "2024-10-31T13:39:10Z")

</div>

When I click “OK” I see this message:

![image](https://discourse.cmake.org/uploads/default/original/2X/1/184ae2ddc0b92c71d417c0bb77ba09e7f3529db0.png)

---

<div class="post-metadata">

### Author: ![8Observer8](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/8/bbe5ce/32.png) [@8Observer8](https://discourse.cmake.org/u/8Observer8)
#### Post date: [October 31, 2024, 11:36pm UTC](https://discourse.cmake.org/t/failed-to-install-cmake-3-31-on-windows-10-64-bit/12875/3 "2024-10-31T23:36:59Z")

</div>

I don’t have CMake 3.28. I have 3.27.7 installed but like a part of Qt:

![image](https://discourse.cmake.org/uploads/default/original/2X/8/87370438b90c6e1fea56fba18b9c2e8bdb9723d7.png)

I don’t want to uninstall 3.27. I want to install 3.31 to another folder but when I run the `cmake-3.31.0-rc3-windows-x86_64.msi` I have the error above.

---

<div class="post-metadata">

### Author: ![8Observer8](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/8/bbe5ce/32.png) [@8Observer8](https://discourse.cmake.org/u/8Observer8)
#### Post date: [October 31, 2024, 11:38pm UTC](https://discourse.cmake.org/t/failed-to-install-cmake-3-31-on-windows-10-64-bit/12875/4 "2024-10-31T23:38:05Z")

</div>

I’ve tried to delete the old 3.27.7 path from the PATH and to click on the `Browse` button here and select msi:

![image](https://discourse.cmake.org/uploads/default/original/2X/7/76c23027b2bbb4c26527a6c87773ec8f416b1550.png)

---

<div class="post-metadata">

### Author: ![8Observer8](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/8/bbe5ce/32.png) [@8Observer8](https://discourse.cmake.org/u/8Observer8)
#### Post date: [October 31, 2024, 11:39pm UTC](https://discourse.cmake.org/t/failed-to-install-cmake-3-31-on-windows-10-64-bit/12875/5 "2024-10-31T23:39:21Z")

</div>

When I click `OK` I see this message:

![image](https://discourse.cmake.org/uploads/default/original/2X/1/158ec5dadbffdc4b34bed08fa2f4cc31ba7eef5e.png)

---

<div class="post-metadata">

### Author: ![8Observer8](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/8/bbe5ce/32.png) [@8Observer8](https://discourse.cmake.org/u/8Observer8)
#### Post date: [October 31, 2024, 11:42pm UTC](https://discourse.cmake.org/t/failed-to-install-cmake-3-31-on-windows-10-64-bit/12875/6 "2024-10-31T23:42:01Z")

</div>

I don’t have another version of CMake (only like a part of Qt):

![image](https://discourse.cmake.org/uploads/default/original/2X/8/844e12da283cdb2d7324185fdfcbcc447309605c.png)

---

<div class="post-metadata">

### Author: ![8Observer8](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/8/bbe5ce/32.png) [@8Observer8](https://discourse.cmake.org/u/8Observer8)
#### Post date: [October 31, 2024, 11:52pm UTC](https://discourse.cmake.org/t/failed-to-install-cmake-3-31-on-windows-10-64-bit/12875/7 "2024-10-31T23:52:56Z")

</div>

I’ve tried `cmake-3.30.5-windows-x86_64.msi` but I see the same result. It says `Try to find the installation package 'cmake-3.28.1-windows-x86_64.msi' in the folder from which you can install CMake`. I’ve tried to install `cmake-3.28.1-windows-x86_64.msi` and it was installed without problems:

![image](https://discourse.cmake.org/uploads/default/original/2X/2/20596d972418d0f08a77d4318cb3fa2fc5c5fcbe.png)

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [November 1, 2024, 9:58pm UTC](https://discourse.cmake.org/t/failed-to-install-cmake-3-31-on-windows-10-64-bit/12875/8 "2024-11-01T21:58:51Z")

</div>

@brad.king Any chance this is related to the CMP0172 policy introduced in CMake 3.31? I think CMake uses its own custom MSI input file rather than one produced by CPack, but worth asking the question.

@8Observer8 Could you please try installing CMake 3.30.5 and see if that gives the same error? Make sure you grab the official MSI package from Kitware ([https://cmake.org/download/](https://cmake.org/download/)).

---

<div class="post-metadata">

### Author: ![8Observer8](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/8/bbe5ce/32.png) [@8Observer8](https://discourse.cmake.org/u/8Observer8)
#### Post date: [November 1, 2024, 10:40pm UTC](https://discourse.cmake.org/t/failed-to-install-cmake-3-31-on-windows-10-64-bit/12875/9 "2024-11-01T22:40:46Z")

</div>

> [@craig.scott](#):
>
> Could you please try installing CMake 3.30.5 and see if that gives the same error?

Yes, the same error. It says: `Try to find the installation package 'cmake-3.28.1-windows-x86_64.msi' in the folder from which you can install CMake`. After this I’ve tried to install [cmake-3.28.1-windows-x86\_64.msi](https://github.com/Kitware/CMake/releases/tag/v3.28.1) and it was installed without problems.

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [November 1, 2024, 11:58pm UTC](https://discourse.cmake.org/t/failed-to-install-cmake-3-31-on-windows-10-64-bit/12875/10 "2024-11-01T23:58:40Z")

</div>

After you install CMake 3.28.1, could you then try to manually uninstall it before trying to install a newer CMake version?

I’m wondering here if there’s a stray registry value that is being left set somehow. Not sure I can offer much guidance on what that might be, it may take trawling through CMake’s packaging scripts to work that out. The relevant parts are likely to be in the files [here](https://gitlab.kitware.com/cmake/cmake/-/tree/master/Utilities/Release/WiX).

---

<div class="post-metadata">

### Author: ![8Observer8](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/8/bbe5ce/32.png) [@8Observer8](https://discourse.cmake.org/u/8Observer8)
#### Post date: [November 2, 2024, 9:33am UTC](https://discourse.cmake.org/t/failed-to-install-cmake-3-31-on-windows-10-64-bit/12875/11 "2024-11-02T09:33:03Z")

</div>

Thank you very much! The problem was solved. I’ve uninstalled CMake 3.28.1 using `Unistall Tool` with clearing the registry:

![image](https://discourse.cmake.org/uploads/default/original/2X/f/f5fdc265da80e952cbd9cfeffd268149c6b92c07.png)

The 3.31.0 version was installed without problems using the `cmake-3.31.0-rc3-windows-x86_64.msi` installer:

```bash
>cmake --version
cmake version 3.31.0-rc3

```

---

<div class="post-metadata">

### Author: ![8Observer8](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/8/bbe5ce/32.png) [@8Observer8](https://discourse.cmake.org/u/8Observer8)
#### Post date: [November 2, 2024, 9:34am UTC](https://discourse.cmake.org/t/failed-to-install-cmake-3-31-on-windows-10-64-bit/12875/12 "2024-11-02T09:34:00Z")

</div>

More detailed screenshot for the message above:

 ![image](https://discourse.cmake.org/uploads/default/original/2X/f/f57b61fd62191bc6bd575e7271e75161da1e84d4.png)
