Home

Util.Cmd execution of LPRun is passing result file as argument.

I have a master query running several other queries using LPRun through Util.Cmd
Due to memory problems I must run out of proc (Util.Cmd instead of running queries directly) both to reduce the overall memory footprint and to not affect the master query in the event of an outofmemory exception. Due to legacy libraries, I must stick to 32 bit.

Util.Cmd is passed two strings, and I suspect it is using logic to determine the need for wrapping up arguments in escape syntax. The behaviour does not appear to be consistent.

This should reproduce the problem.


var sampleargs = @"""C:\LINQPad Queries\LPRunArgs.linq"" ""ARG 2"" ""ARG 3"" ""ARG 1"" ""ARG 1"" > ""c:\temp\result file.html""";
var runcmd = @lprun;
Util.Cmd (runcmd,sampleargs);

This results in ">" and "c:\temp\result file.html" being passed in as arguments to the LPRunArgs query and no output file is being produced. Am I putting the piping information in the wrong location?

Comments

Sign In or Register to comment.