Finding the developer tools

Tools like sn.exe for signing programs and mt for including manifests always seem to be tucked away in awkward places that take a while to find. Here’s a simple batch file for finding them on an english box installed in a fairly standard way. It checks for the Windows SDK then looks for Visual Studio. That way it normally finds what you are trying to run.

I find this particularly useful because it means that I can use regular machines to build my program without having Visual Studio installed. That way I can have backup machines and a build server without needing lots of copies of Visual Studio. The SDK is fairly heavy weight but it seems more appropriate on some machines.

@echo off
set PROGDIR=%ProgramFiles%\Microsoft SDKs\Windows\v6.0\Bin
IF EXIST "%PROGDIR%" goto :build
set PROGDIR=%ProgramFiles%\Microsoft Visual Studio 8\SDK\v2.0\bin
set PROG=shift
"%PROGDIR%\%1" %2 %3 %4 %5 %6 %7 %8 %9


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s