Time to bust out the old school: pipe the data in through stdin (and save results of stdout).
Here's[
^] a KB article.
I think stdin redirection is where you're going to end up, you'll just need to find an approach that works for your situation.
Cheers.