How do you fix error msb6006 cmd.exe exited with code 9009?

Alton Alexander
By Alton AlexanderUpdated on June 4th, 2022

The "msb6006 cmd.exe exited with code 9009" error is a type of Build Tools error that can occur when certain files in the Build Tools installation are missing or corrupt. This error can also occur if the Build Tools installation is not up to date. To fix this error, you can try uninstalling and then re-installing the Build Tools. You can also try running the "repair" option on the Build Tools installation. If the error persists, you may need to contact Microsoft for further assistance.

1. Check the spelling of the command

  1. Type msb6006 cmd and press Enter.
  2. If the command is correct, you will see a message saying "Command completed successfully." If there is an error, you will see a message indicating the error.
  3. To fix the error, you will need to correct the spelling of the command.

2. Check the syntax of the command

  1. Type "msb6006" and press Enter
  2. If you get the error 9009, then the syntax of the command is incorrect. Fix the syntax of the command by following these steps: a. Change the "cmd.exe" to "cmd" b. Change the "msb6006" to "msiexec" c. Change the "exit code" to "0"

3. Use the correct path to the command

  1. Open a command prompt.
  2. Type "cmd" and press Enter.
  3. Type "cd" and press Enter.
  4. Type "cmd" and press Enter.
  5. Type "msb6006" and press Enter.
  6. Type "setlocal EnableDelayedExpansion" and press Enter.
  7. Type "cmd" and press Enter.
  8. Type "del /q" and press Enter.
  9. Type "cmd" and press Enter.
  10. Type "exit" and press Enter.

4. Use the correct version of the command

In order to fix the error msb6006 cmd.exe exited with code 9009, you will need to use the correct version of the command. To do this, you will need to open the Command Prompt window by clicking on the Start button and typing "cmd" into the search bar. Once you have opened the Command Prompt window, you will need to type the following command into it: C:> msiexec.exe /i msb6006.msi Once you have entered the above command, you will need to press the Enter key on your keyboard. If you receive a message stating that the command is not valid, you will need to install the Microsoft Windows Management Instrumentation (WMI) 2.0 provider by following the instructions provided by Microsoft. After you have installed the WMI 2.0 provider, you will need to restart your computer in order to apply the changes.

5. Use the correct options for the command

  1. Open a command prompt as an administrator.
  2. Type msconfig and press Enter.
  3. On the System Configuration tab, under Startup and Recovery, click Disable all services.
  4. Scroll down tocmd.exe, and click the Stop button.
  5. Click the Start button to restart the cmd.exe service.
  6. Type msconfig again, and this time under the Startup and Recovery tab, click Enable all services.
  7. Click the OK button to save your changes.

Some users might also have success with the following opitons:

  1. Run the command as administrator.
  2. Restart the computer and try again.
  3. Contact the manufacturer of the command for support.