# Windows default CMAKE\_INSTALL\_PREFIX is wrong?

**URL:** https://discourse.cmake.org/t/windows-default-cmake-install-prefix-is-wrong/15272
**Category:** Usage
**Created:** [October 28, 2025, 3:06pm UTC](https://discourse.cmake.org/t/windows-default-cmake-install-prefix-is-wrong/15272 "2025-10-28T15:06:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Peter\_Hull](https://discourse.cmake.org/user_avatar/discourse.cmake.org/peter_hull/32/5861_2.png) [@Peter\_Hull](https://discourse.cmake.org/u/Peter_Hull)
#### Post date: [October 28, 2025, 3:06pm UTC](https://discourse.cmake.org/t/windows-default-cmake-install-prefix-is-wrong/15272/1 "2025-10-28T15:06:37Z")

</div>

Can anyone explain why the default prefix for Windows has (x86) in it,

```auto
//Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/{project name}

```

even though I have a 64 bit compiler active. As I understand it, 64-bit exes should go into c:\Program Files\

```shell
> cl /?
Microsoft (R) C/C++ Optimizing Compiler Version 19.44.35219 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

```

The [manual](https://cmake.org/cmake/help/v4.1/variable/CMAKE_INSTALL_PREFIX.html#variable:CMAKE_INSTALL_PREFIX) says

```plaintext
* Added in version 3.29: If the CMAKE_INSTALL_PREFIX environment variable is set, its value is used as default for this variable.
* c:/Program Files/${PROJECT_NAME} on Windows.

```

I am using cmake 4.1.1 on Windows 11.

Is there a way to default it to the correct value? (I know it can be set manually)

Thanks.

An example file:

```auto
cmake_minimum_required(VERSION 3.10)

project(Ind C)

```

Run `cmake -B _build` and you will see the default install setting in `_build\CMakeCache.txt`

---

<div class="post-metadata">

### Author: ![LegalizeAdulthood](https://discourse.cmake.org/user_avatar/discourse.cmake.org/legalizeadulthood/32/5282_2.png) [@LegalizeAdulthood](https://discourse.cmake.org/u/LegalizeAdulthood)
#### Post date: [October 28, 2025, 4:36pm UTC](https://discourse.cmake.org/t/windows-default-cmake-install-prefix-is-wrong/15272/2 "2025-10-28T16:36:26Z")

</div>

Specify `-A x64` to explicitly configure a 64-bit executable with VS, although this does seem to be a confusion about defaults as without `-A` it clearly generates a 64-bit executable/project.

---

<div class="post-metadata">

### Author: ![Peter\_Hull](https://discourse.cmake.org/user_avatar/discourse.cmake.org/peter_hull/32/5861_2.png) [@Peter\_Hull](https://discourse.cmake.org/u/Peter_Hull)
#### Post date: [October 29, 2025, 10:24am UTC](https://discourse.cmake.org/t/windows-default-cmake-install-prefix-is-wrong/15272/3 "2025-10-29T10:24:57Z")

</div>

Thanks for the swift reply. Specifying `-A x64` as you suggest does set the correct install path.
