1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

CMD incompatibility

Discussion in 'Support' started by TimButterfield, Feb 20, 2017.

  1. TimButterfield

    Joined:
    May 20, 2008
    Messages:
    402
    Likes Received:
    2
    I'm trying to run the vcvarsall.bat from VS2015 update 3 to include the Windows SDK version 10.0.14393.0. Unfortunately, the batch file does not work correctly under TCC. I get this:
    Code:
    vcvarsall.bat amd64 10.0.14393.0
    !ERROR! Windows SDK 10.0.14393.0 : 'C:\Program Files (x86)\Windows Kits\10\inclu
    de\10.0.14393.0\um'
    This appear to be related to something in
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\vcvarsqueryregistry.bat.
    Around line 88, it has this block of code:
    Code:
    @setlocal enableDelayedExpansion
    @if not "%WindowsSdkDir%"=="" @for /f %%i IN ('dir "%WindowsSdkDir%include\" /b /ad-h /on') DO (
        @REM Skip if Windows.h is not found in %%i\um.  This would indicate that only the UCRT MSIs were
        @REM installed for this Windows SDK version.
        @if EXIST "%WindowsSdkDir%include\%%i\um\Windows.h" (
            @set result=%%i
            @if "!result:~0,3!"=="10." (
                @set SDK=!result!
                @if "!result!"=="%user_inputversion%" set findSDK=1
            )
        )
    )
    Since the DIR command appears to be working, I suspect the issue is something related to the enabledDelayedExpansion parameter to setlocal, but that's as far as I have gotten.

    When I run it under CMD, it works just fine.

    Code:
    TCC  20.11.40 x64   Windows 10 [Version 6.3.14393]
    TCC Build 40   Windows 10 Build 14393
     
  2. MaartenG

    Joined:
    Aug 3, 2016
    Messages:
    355
    Likes Received:
    8
    Is this issue different from the ones reported earlier on these forums ( [title] ) where the solution was to set some environment variable first?
     
  3. TimButterfield

    Joined:
    May 20, 2008
    Messages:
    402
    Likes Received:
    2
    Trying that different start mechanism did not change the behavior.
     
  4. TimButterfield

    Joined:
    May 20, 2008
    Messages:
    402
    Likes Received:
    2
    If you're referring to the environment variable, that is set from the default environment.
    Code:
    VS140COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
     
  5. MaartenG

    Joined:
    Aug 3, 2016
    Messages:
    355
    Likes Received:
    8
    Ok, seems to be another problem, then. There was also a mention of enabling delayed expansion in TCMD.ini (through the OPTION command) IIRC. That is as far as I can help (no experience with Visual Studio).
     
  6. TimButterfield

    Joined:
    May 20, 2008
    Messages:
    402
    Likes Received:
    2
    I think, in this case, there are parameters in the SETLOCAL of CMD that are not supported in TCC. There may be additional things, but that was the most apparent.
     
  7. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,860
    Likes Received:
    83
    Not reproducible here (and I run VCVARSALL several times a day, every day).

    SETLOCAL in TCC does support the "EnableDelayedExpansion" variable (as well as "DisableDelayedExpansion, EnableExtensions, and DisableExtensions). They are not documented in the TCMD help because TCC doesn't need them.

    I suspect the issue is more likely in your TCMD.INI.[/QUOTE]
     
  8. TimButterfield

    Joined:
    May 20, 2008
    Messages:
    402
    Likes Received:
    2
    This is with a fresh install in a brand new VM. So, no pre-existing cruft hanging around to corrupt the INI. I don't recall changing too much from the INI defaults, insert mode, complete hidden, add \ to directories, and hiding a bunch of stuff in the UI.
     
  9. TimButterfield

    Joined:
    May 20, 2008
    Messages:
    402
    Likes Received:
    2
    It's no longer causing the error for me now either. My TCC/TCMD are unchanged. I did install an older SDK version for a project, though that's not the one that is set when I run vsvarsall x64 and let it default the SDK. But, no error. Strange.
     

Share This Page