The following script
cmd /C ""set PATH=nasm\;%PATH%" & "echo %PATH%""
Only prints this:
The input line is too long.
The input line is too long.
Why? How can I fix this?
P. S. This works:
cmd /C "echo %PATH%"
And this doesn't:
cmd /C ""echo %PATH%""
The OP's problem differed slightly from mine, but I also had The input line is too long
error in a very basic script for no obvious reason.
In my case, the reason that it was not obvious is that I had earlier corrupted my environment by recursively setting my Path until it exceeded the permissible size and then I had fixed the issue before attempting to diagnose the error.
Restarting the command prompt was sufficient in this case to get a fresh Path.
To test if you might have done something like this, just display your environment variables by running set
with no arguments. In my case, it showed the recursively set Path (much longer than shown here, but you see the repeating parts):
C:\dev_build>set
...
Path=C:\qnx660\host\win32\x86\usr\bin;C:\qnx660\.qnx\bin;C:\qnx660\jre\bin;C:\qnx660\host\win32\x86\usr\bin;C:\qnx660\.qnx\bin;C:\qnx660\jre\bin;C:\qnx660\host\win32\x86\usr\bin;C:\qnx660\.qnx\bin;C:\qnx660\jre\bin;C:\qnx660\host\win32\x86\usr\bin;C:\qnx660\.qnx\bin;C:\qnx660\jre\bin;C:\qnx660\host\win32\x86\usr\bin;C:\qnx660\.qnx\bin;C:\qnx660\jre\bin;C:\qnx660\host\win32\x86\usr\bin;C:\qnx660\.qnx\bin;C:\qnx660\jre\bin;C:\qnx660\host\win32\x86\usr\bin;C:\qnx660\.qnx\bin;...
...
Any further attempts to do anything to Path gave me The input line is too long
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With