My only guess is that extensions have been disabled on the non-working machine.
setlocal /? has a code snippet that can be used to check whether extensions are enabled or not.
The SETLOCAL command will set the ERRORLEVEL value if given
an argument. It will be zero if one of the two valid arguments
is given and one otherwise. You can use this in batch scripts
to determine if the extensions are available, using the following
VERIFY OTHER 2>nul
IF ERRORLEVEL 1 echo Unable to enable extensions
There is also more info in cmd /?
Command Extensions are enabled by default. You may also disable
extensions for a particular invocation by using the /E:OFF switch. You
can enable or disable extensions for all invocations of CMD.EXE on a
machine and/or user logon session by setting either or both of the
following REG_DWORD values in the registry using REGEDT32.EXE:
to either 0x1 or 0x0. The user specific setting takes precedence over
the machine setting. The command line switches take precedence over the