Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

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

    Installation and Deployment
    6
    9
    5202
    Loading More Posts
    • 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
      MGhsw last edited by

      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 ;)

      sierdzio 1 Reply Last reply Reply Quote 0
      • sierdzio
        sierdzio Moderators @MGhsw last edited by

        @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 Reply Quote 3
        • aha_1980
          aha_1980 Lifetime Qt Champion last edited by

          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 Reply Quote 3
          • M
            MGhsw last edited by

            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 Reply Quote 1
            • L
              liuyu @MGhsw last edited by

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

              JKSH 1 Reply Last reply Reply Quote 0
              • JKSH
                JKSH Moderators @liuyu last edited by

                @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 Reply Quote 0
                • L
                  liuyu @JKSH last edited by

                  @JKSH
                  Hello, my version is 4.8.2

                  JKSH 1 Reply Last reply Reply Quote 0
                  • JKSH
                    JKSH Moderators @liuyu last edited by

                    @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 Reply Quote 3
                    • G
                      Goldd @MGhsw last edited by

                      @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 Reply Quote 0
                      • First post
                        Last post