function msvcSDK71SetupFcn(vsvarsFile)
% This function is used by Microsoft Windows SDK 7.1 MATLABSetup (in ms_vc.m) 
% to generate a local bat file into the build folder. Microsoft Windows SDK 7.1 
% doesn't ship with the vcvars bat file, so we generate this local bat  
% file and use it instead.

% Copyright 2014-2015 The MathWorks, Inc.

    mexCompConfig = mex.getCompilerConfigurations('C','Installed');
    idx = ismember({mexCompConfig(:).Name}, 'Microsoft Windows SDK 7.1 (C)');
    if any(idx)
        batFileStr = mexCompConfig(idx).Details.SetEnv;
        fid = fopen( vsvarsFile, 'w+' );
        fprintf( fid, '%s', batFileStr );
        fclose( fid );   
    end
end

% LocalWords:  SDK vc vcvars
