The NSIS installer for windows has the option "Add to PATH". When this option is ticked, the system path is modified to include "C:\D\dmd2\windows\bin", which is correct on 32 bit Windows. On 64 bit Windows, "C:\D\dmd2\windows\bin64" is preferred. The installer should detect the version of Windows and set the path accordingly. Grep for "Target was appended to PATH", which is displayed at the end of the installation.
Since a number of tools that exist in "C:\D\dmd2\windows\bin" are absent in "C:\D\dmd2\windows\bin64", it is probably best to include both in PATH, but "bin64" before "bin".
@veelo updated dlang/installer pull request #555 "Prefer 64 bit over 32 bit DMD on Windows 64 bit." fixing this issue: - fix Issue 23623 - Prefer 64 bit over 32 bit DMD on Windows 64 bit. Fixes https://issues.dlang.org/show_bug.cgi?id=23623 https://github.com/dlang/installer/pull/555
dlang/installer pull request #555 "Prefer 64 bit over 32 bit DMD on Windows 64 bit." was merged into stable: - 37b76f720cb3ebe2e08be72fb6c66a8945624693 by Bastiaan Veelo: fix Issue 23623 - Prefer 64 bit over 32 bit DMD on Windows 64 bit. Fixes https://issues.dlang.org/show_bug.cgi?id=23623 https://github.com/dlang/installer/pull/555
dlang/installer pull request #557 "merge stable" was merged into master: - 2f9caa9b11b5f8a718fa20f69e99a95b73779ee9 by Bastiaan Veelo: fix Issue 23623 - Prefer 64 bit over 32 bit DMD on Windows 64 bit. Fixes https://issues.dlang.org/show_bug.cgi?id=23623 https://github.com/dlang/installer/pull/557