Hi,

I just wanted to share an example of user-config.jam that makes MSVC toolset to use the standard WinSDK environment.

---- user-config.jam ----
import modules : poke ;
import path : join ;

#
# Helper scripts are used to pass parameters to SetEnv.cmd
#

local profile = [ modules.binding user-config ] ;
local setup-x86 = [ path.join $(profile:P) wdk_x86.cmd ] ;
local setup-x64 = [ path.join $(profile:P) wdk_x64.cmd ] ;
local setup-ia64 = [ path.join $(profile:P) wdk_ia64.cmd ] ;

using msvc
    :
        9.0
    : :
        <setup-i386>$(setup-x86)
        <setup-amd64>$(setup-x64)
        <setup-ia64>$(setup-ia64)
    ;

#
# SetEnv.cmd requires CMD extensions to work
#
modules.poke msvc : JAMSHELL : cmd.exe /E:ON /V:ON /Q /C % ;
---- -----

---- wdk_x86.cmd ----
@echo off
call D:\WinSDK\v6.1\Bin\SetEnv.Cmd /x86
---- -----

---- wdk_x64.cmd ----
@echo off
call D:\WinSDK\v6.1\Bin\SetEnv.Cmd /x64
---- -----

---- wdk_ia64.cmd ----
@echo off
call D:\WinSDK\v6.1\Bin\SetEnv.Cmd /ia64
---- -----

Sure you need to use your own path to the SDK in the helper scripts.

PS: It took quite a while to get it working. I must say that configuration rules from MSVC toolset got out of hand. They need to be refactored so that it will be possible to setup architecture (x86, x64 and ia64) independently.

Also calling a setup script per each rule does not seem to be very efficient. Maybe it can be optimized by executing the setup script once and capturing environment differences.

--
Best regards,
 Alexey Pakhunov.