As extensões de comando estão desativadas por algum motivo. As extensões de comando envolvem alterações sérias nos argumentos da Linha de Comando (Parâmetros) , como por CALL /? .
No entanto, o próximo trecho de CMD /? mostra algumas dicas de solução:
Command Extensions are enabled by default. You may also disable extensions for a particular invocation by using the
/E:OFFswitch. You can enable or disable extensions for all invocations ofCMD.EXEon a machine and/or user logon session by setting either or both of the followingREG_DWORDvalues in the registry usingREGEDIT.EXE:HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\EnableExtensionsand/or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\EnableExtensionsto either
0x1or0x0. The user specific setting takes precedence over the machine setting. The command line switches take precedence over the registry settings.In a batch file, the
SETLOCAL ENABLEEXTENSIONSorDISABLEEXTENSIONSarguments takes precedence over the/E:ONor/E:OFFswitch. SeeSETLOCAL /?for details.
Exemplo
==>type D:\bat\cliParser.bat
@echo OFF >NUL
echo all %%* = %*
set /A "ii=0"
:loopfor
echo param %%%ii% = %0
SHIFT
set /A "ii+=1"
if not [%0]==[] goto :loopfor
goto :eof
==>D:\bat\cliParser.bat aaa bbb
all %* = aaa bbb
param %0 = D:\bat\cliParser.bat
param %1 = aaa
param %2 = bbb
==>cmd /E:OFF /C D:\bat\cliParser.bat aaa bbb
all %* = *
The syntax of the command is incorrect.
param %3 = D:\bat\cliParser.bat
The syntax of the command is incorrect.
param %3 = aaa
The syntax of the command is incorrect.
param %3 = bbb
The syntax of the command is incorrect.
The system cannot find the batch label specified - eof
==>