Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


RunShell with Parameters Longer than 100 Chars

Keywords:   runshell 125

Question:

Whenever I try to runshell with parameters line longer than 100 char it does not run

Example:


runshell("c:\login\runbatch.bat",'1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678912345678901',"",@NORMAL,@wait)

Where Runbatch.bat is: 
Echo %1 %2 %3 
Pause 

Answer:

Depends on OS.

Windows has various command line length limits ranging from aobut 80 characters in Windows 3.1 to about 123 in Windows 95 and much higher in NT.

So the adding the exe name and all the parameters, if they get beyond the limits sometimes information is lost.

Usually I've just seen the parameters truncated.

This is a limitation of CreateProcess() API. The command line to launch a DOS program:


	"path\program" parameters
cannot exceed 123 characters.
Article ID:   W13106
Filename:   RunShell with Parameters longer than 100 Char.txt