run vs runret

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
gwm
Posts: 6
Joined: 18 Aug 2021 16:57
Location: Win 11 Pro 24H2, 125%

run vs runret

Post by gwm »

Can anyone please explain the difference "under the hood" between runret and run? I use XYPlorer to trigger a few perl scripts. After a perl upgrade, I started seeing an error message on running my scripts via the XYPlorer run command: "The operation was cancelled by the user". The same scripts run fine from the command line and I just discovered that they also run fine from XYPlorer using runret instead of run. I don't think this is a bug with XYPlorer (though I haven't ruled that out either), but to identify why the perl upgrade provoked this, it would be useful to understand how run and runret start the perl process.

jupe
Posts: 3446
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: run vs runret

Post by jupe »

I think they both just use ShelllExecute under the hood but runret output is captured, so the difference would be by using run perl might be identifying that there is no STDOUT to output to, maybe if you change the run to run it in a cmd shell it would work, ie run "cmd /c perl.exe etc...";

gwm
Posts: 6
Joined: 18 Aug 2021 16:57
Location: Win 11 Pro 24H2, 125%

Re: run vs runret

Post by gwm »

Thanks for that. So you're suggesting that perl is failing because it isn't provided a STDOUT? Interesting. You're correct that it works with run "cmd /c perl.exe etc..." so I think you may be on to something. It has certainly given me food for thought.

Post Reply