To reproduce:
- Create directory: `c:\1 2 3 4 5 6 7 8 9 0\.123456789.123456789.123456789.123456789.123456789.123456789`
- Create shortcut: `c:\1 2 3 4 5 6 7 8 9 0\.123456789.123456789.123456789.123456789.123456789.123456789\cmd.lnk` to the `C:\WINDOWS\System32\cmd.exe`
- Create a button:
Code: Select all
cmd=c:\1 2 3 4 5 6 7 8 9 0\.123456789.123456789.123456789.123456789.123456789.123456789\cmd.lnk param=/C @"c:\1 2 3 4 5 6 7 8 9 0\.123456789.123456789.123456789.123456789.123456789.123456789\01234567890123456789.bat" -0123456789 -0123456789 -0123456789 -0123456789 -0123456789 -0123456789 -0123456789 -0123456789 "%P\."
- Create the `01234567890123456789.bat` script:
Code: Select all
@echo off setlocal echo - echo %0 %* echo - pause
Code: Select all
-
"c:\1 2 3 4 5 6 7 8 9 0\.123456789.123456789.123456789.123456789.123456789.12345
6789\01234567890123456789.bat" -0123456789 -0123456789 -0123456789 -0123456789 -
0123456789 -0123456789 -0123456789 -0123456789 "c:\1 2 3 4 5 6 7 8 9 0\.12345678
9.123456789.1
-
If run the command manually from the console:
Code: Select all
C:\1 2 3 4 5 6 7 8 9 0\.123456789.123456789.123456789.123456789.123456789.123456789>C:\WINDOWS\System32\cmd.exe /C @"c:\1 2 3 4 5 6 7 8 9 0\.123456789.123456789.123456789.123456789.123456789.123456789\01234567890123456789.bat" -0123456789 -0123456789 -0123456789 -0123456789 -0123456789 -0123456789 -0123456789 -0123456789 "c:\1 2 3 4 5 6 7 8 9 0\.123456789.123456789.123456789.123456789.123456789.123456789\."
As I understand correctly the length of the initial parameters list is around 255 characters:
Code: Select all
@"c:\1 2 3 4 5 6 7 8 9 0\.123456789.123456789.123456789.123456789.123456789.123456789\01234567890123456789.bat" -0123456789 -0123456789 -0123456789 -0123456789 -0123456789 -0123456789 -0123456789 -0123456789 "c:\1 2 3 4 5 6 7 8 9 0\.123456789.123456789.1
PS: If try to replace the shortcut with the `C:\WINDOWS\System32\cmd.exe`, then the issue is not reproducible.