The cmd.exe that runs a batch shim — ALWAYS the system interpreter built from a TRUSTED env, NEVER a child env's %ComSpec%: absolute %SystemRoot%\System32\cmd.exe (win32.join so it's backslash-correct even in off-Windows tests).
%ComSpec%
%SystemRoot%\System32\cmd.exe
win32.join
The cmd.exe that runs a batch shim — ALWAYS the system interpreter built from a TRUSTED env, NEVER a child env's
%ComSpec%: absolute%SystemRoot%\System32\cmd.exe(win32.joinso it's backslash-correct even in off-Windows tests).