You have to start by figuring out how console.exe handles accepting the command parameter of '-r' and in particular how it handles the need for quoting within the command.
For this, completely ignore XY, hop on down to command prompt town, and start experimenting. It seems that to use quotes within the command console wants them to be escaped with a '\' so you might have:
Code: Select all
console.exe -r "/k dir \"C:\Program Files\""
Now using that knowledge attempt to run it via XY's
run command - keep in mind that the whole argument needs quotes and therefore any quotes within the argument must be escaped by doubling them:
Code: Select all
run "console.exe -r ""/k dir \""C:\Program Files\""""";
Once you have that working, try replacing the literal path with the desired variables:
Code: Select all
run "console.exe -r ""/k dir \""<curpath>\""""";
So your final result might be something like:
Code: Select all
run "console.exe -r ""/k D:\Xpdf\pdfinfo.exe \""<curitem>\""""";
To better understand that mess of quotes let's break it down a little with some white space and explain the 3 sets of surrounding quotes:
Code: Select all
run "console.exe -r ""/k D:\Xpdf\pdfinfo.exe \""<curitem>\"" "" ";
1 2 3 3 2 1
1: These are the quotes that must surround the entire argument of XY's run.
2: These are the quotes that surround console.exe -r's command parameter, because they are within 1 they need to be escaped for XY by doubling them.
3: These are the quotes within the command parameter that surround the argument to pdfinfo.exe. Like 2, because these are within 1 they need to be doubled for XY. However they are also within 2 which means they need to be escaped by '\' for console.exe to handle them correctly.
HTH