title: dockerfile shell instruction to run all further commands in ms build tools command prompt
body: <p>The instructions in the dockerfile:</p>
  <pre><code>SHELL [&quot;C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Visual Studio 2022\\Visual Studio Tools\\VC\\x64 Native Tools Command Prompt for VS 2022.lnk&quot;]
  
  RUN cmake
  </code></pre>
  <p>gives me the error:</p>
  <blockquote>
  <p>Step 5/6 : shell [&quot;C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2022\Visual Studio Tools\VC\x64 Native Tools Command Prompt for VS 2022.lnk&quot;]
  ---&gt; Using cache
  ---&gt; 6ae0c4b6e45e</p>
  </blockquote>
  <blockquote>
  <p>Step 6/6 : RUN cmake
  ---&gt; Running in 11bfaf29327d
  container 11bfaf29327d2d636ef439569d53774f3c486d128b5d103c0d94523afa7a6f83 encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: %1 is not a valid Win32 application. (0xc1)
  [Event Detail:  Provider: 00000000-0000-0000-0000-000000000000]
  [Event Detail:  Provider: 00000000-0000-0000-0000-000000000000]
  [Event Detail: onecore\vm\compute\management\orchestration\vmhostedcontainer\processmanagement.cpp(173)\vmcomputeagent.exe!00007FF7D032A41B: (caller: 00007FF7D02E5C9B) Exception(2) tid(390) 800700C1 %1 is not a valid Win32 application.
  CallContext:[\Bridge_ProcessMessage\VmHostedContainer_ExecuteProcess]
  Provider: 00000000-0000-0000-0000-000000000000]</p>
  </blockquote>
  <p>The only workaround I have found is to use all the time:</p>
  <pre><code>RUN cd &quot;C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Auxiliary\\Build\\&quot; \
     &amp;&amp; vcvars64.bat \
     &amp;&amp; cmake         
  </code></pre>
  <p>but this is not very convenient.</p>