DirectX SDK installation has broke Visual Studio command prompt paths

After installation 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.


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.

Leave a Reply (Markdown is enabled)

Your email address will not be published.