Brunov's blog

Sergey Vyacheslavovich Brunov's blog

DirectX SDK installation has broke Visual Studio command prompt paths

2011-04-26 13:56:56 Moscow time

After installing DirectX SDK (December 2005), Visual Studio 2008 SP1 command prompt can not find tools (such as mt.exe).

I have found the solution here: Serious Visual Studio 2008 install bug that can break your builds.

Quote (slightly reformatted):

This leaves us with two solutions of the problem:

  1. Remove any path that has ( or ) from your PATH system environment variable. This is what I did.

  2. Rewrite the If to use goto like this:

    @if "%WindowsSdkDir%" == "" goto SkipSDKVariableSet
    @set "PATH=%WindowsSdkDir%bin;%PATH%"
    @set "INCLUDE=%WindowsSdkDir%include;%INCLUDE%"
    @set "LIB=%WindowsSdkDir%lib;%LIB%"

The problem with this is that any upgrades can overwrite this so you have to remember and reapply this change.