 <p>I suspect that you have a <code>SETLOCAL</code> in <code>a.bat</code>. ANY environment changes made after a SETLOCAL are backed out when the matching <code>ENDLOCAL</code> (or <code>EOF</code> in the same context) is reached.</p> <p>Depending on how you are terminating <code>a.bat</code>, you'd need something in the order of <code>ENDLOCAL&amp;set "Path=dir_b;%PATH%"&amp;GOTO :EOF</code> which will prepend <code>dir_b</code> to your existing path as you appear to exepect for the duration of that particular CMD session.</p>