Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Failed to retrieve MSVC Environment ... The command "C:\Windows\system32\cmd.exe" could not be started.
QtWS25 Last Chance

Failed to retrieve MSVC Environment ... The command "C:\Windows\system32\cmd.exe" could not be started.

Scheduled Pinned Locked Moved Solved Installation and Deployment
9 Posts 6 Posters 6.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MGhsw
    wrote on last edited by
    #1

    Hello,

    I have a problem after installing Qt 5.11 on my Computer (Windows 7 64 bit).
    First I installed the Microsoft Visual C++ 2015 Redistributable (x86) because I need to compile with this due to given DLL files.
    I downloaded and installed the Qt for MSVC 2015 x86 and tried to launch the Qt Creator 4.7.0. It takes around half a minute to start and I get immediately 23 Issues that all have in common:
    "Failed to retrieve MSVC Environment ...
    The command "C:\Windows\system32\cmd.exe" could not be started."

    It is also impossible to compile a short program.
    The warning in the Kit is: "CMake configuration has no path to C++ compiler set, even though the kit has a valid tool chain"

    I tried reinstalling it several times now, but it does not change anything.

    I hope you can help me. Everything happend after an update of Qt.

    Thank you in advance ;)

    sierdzioS 1 Reply Last reply
    0
    • M MGhsw

      Hello,

      I have a problem after installing Qt 5.11 on my Computer (Windows 7 64 bit).
      First I installed the Microsoft Visual C++ 2015 Redistributable (x86) because I need to compile with this due to given DLL files.
      I downloaded and installed the Qt for MSVC 2015 x86 and tried to launch the Qt Creator 4.7.0. It takes around half a minute to start and I get immediately 23 Issues that all have in common:
      "Failed to retrieve MSVC Environment ...
      The command "C:\Windows\system32\cmd.exe" could not be started."

      It is also impossible to compile a short program.
      The warning in the Kit is: "CMake configuration has no path to C++ compiler set, even though the kit has a valid tool chain"

      I tried reinstalling it several times now, but it does not change anything.

      I hope you can help me. Everything happend after an update of Qt.

      Thank you in advance ;)

      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @MGhsw said in Failed to retrieve MSVC Environment ... The command "C:\Windows\system32\cmd.exe" could not be started.:

      Microsoft Visual C++ 2015 Redistributable (x86)

      This is not a compiler, it's the C++ runtime. You need to install Microsoft Visual Studio and install MSVC 2015 through there.

      (Z(:^

      1 Reply Last reply
      3
      • aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi @MGhsw,

        seems you hit QTCREATORBUG-20829. Please see there for reasons and possible solutions/workarounds.

        Qt has to stay free or it will die.

        1 Reply Last reply
        3
        • M Offline
          M Offline
          MGhsw
          wrote on last edited by
          #4

          I reinstalled the Microsoft Visual Studio I already had on my computer. It was not the solution.
          But the QTCREATORBUG-20829 was the right thing.
          Now it seems to work again.

          Thank you for the hint.

          L G 2 Replies Last reply
          1
          • M MGhsw

            I reinstalled the Microsoft Visual Studio I already had on my computer. It was not the solution.
            But the QTCREATORBUG-20829 was the right thing.
            Now it seems to work again.

            Thank you for the hint.

            L Offline
            L Offline
            liuyu
            wrote on last edited by
            #5

            @MGhsw
            Hello, I have the same problem. How did you solve it? thank you very much indeed.
            4feb7e28-fc54-4476-bc62-8b452a433752-图片.png

            JKSHJ 1 Reply Last reply
            0
            • L liuyu

              @MGhsw
              Hello, I have the same problem. How did you solve it? thank you very much indeed.
              4feb7e28-fc54-4476-bc62-8b452a433752-图片.png

              JKSHJ Offline
              JKSHJ Offline
              JKSH
              Moderators
              wrote on last edited by
              #6

              @liuyu said in Failed to retrieve MSVC Environment ... The command "C:\Windows\system32\cmd.exe" could not be started.:

              Hello, I have the same problem. How did you solve it?

              The problem described in this thread was fixed in Qt Creator 4.7.1 (see https://bugreports.qt.io/browse/QTCREATORBUG-20829 )

              What is your version of Qt Creator?

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              L 1 Reply Last reply
              0
              • JKSHJ JKSH

                @liuyu said in Failed to retrieve MSVC Environment ... The command "C:\Windows\system32\cmd.exe" could not be started.:

                Hello, I have the same problem. How did you solve it?

                The problem described in this thread was fixed in Qt Creator 4.7.1 (see https://bugreports.qt.io/browse/QTCREATORBUG-20829 )

                What is your version of Qt Creator?

                L Offline
                L Offline
                liuyu
                wrote on last edited by
                #7

                @JKSH
                Hello, my version is 4.8.2

                JKSHJ 1 Reply Last reply
                0
                • L liuyu

                  @JKSH
                  Hello, my version is 4.8.2

                  JKSHJ Offline
                  JKSHJ Offline
                  JKSH
                  Moderators
                  wrote on last edited by
                  #8

                  @liuyu said in Failed to retrieve MSVC Environment ... The command "C:\Windows\system32\cmd.exe" could not be started.:

                  Hello, my version is 4.8.2

                  • Try disabling your antivirus (see https://bugreports.qt.io/browse/QTCREATORBUG-20829 )
                  • Check that cmd.exe is still present on your PC (see https://forum.qt.io/topic/122397/failed-to-retrieve-msvc-environment-the-command-c-windows-system32-cmd-exe-could-not-be-started )
                  • If it still doesn't work, try upgrading to a newer version (the latest is Qt 5.15.2 + Qt Creator 4.14)

                  Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                  1 Reply Last reply
                  3
                  • M MGhsw

                    I reinstalled the Microsoft Visual Studio I already had on my computer. It was not the solution.
                    But the QTCREATORBUG-20829 was the right thing.
                    Now it seems to work again.

                    Thank you for the hint.

                    G Offline
                    G Offline
                    Goldd
                    wrote on last edited by
                    #9

                    @MGhsw Hi I have the same problem. It's quite a long time but can you remember what you did to solve this, I can't find the solution in QTCREATORBUG-20829

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved