Page 1 of 1
node.createExternalProcess
Posted: Tue Nov 08, 2011 12:52 pm
by MJones
I was looking to use this method instead of the ole _shellExecute but it seems to have a pretty big limitation. The arguments are for some reason passed in a JADE string array which obviously limits the arguments to 64 characters each. The main reason I wanted to use this was because it was modal and generally speaking cleaner. Any smart ways or alternative methods around to get longer string arguments in?
Re: node.createExternalProcess
Posted: Tue Nov 08, 2011 1:22 pm
by torrie
The 30 character limit is an issue with file names etc. We've just subclassed the StringArray class and increased the length of each item in the array to 256. Seems to work OK with the createProcess method.
Re: node.createExternalProcess
Posted: Tue Nov 08, 2011 2:04 pm
by MJones
Thanks Torrie, Sometimes the simplest solution is the best.
Cheers!
Re: node.createExternalProcess
Posted: Wed Nov 09, 2011 9:23 am
by JohnP
You can also just put the entire command line in the command parameter, and leave the args array null. This is what I usually do, as it usually results in code that is easier to read.