I looking the way to run DOS/windows batch directly from C# code without saving it as .BAT file before. I'm mainly interested to run DOS command with combination of stdin stream.
Let's say I need execute something like that:
echo 'abcd' | programXXX.exe -arg1 --getArgsFromStdIn
After that programXXX.exe will take 'abcd' string as -arg1
What I'm doing now is just create bat file in TMP directory and running it, deleting after execution.
What I need is run it "on the fly" just from .NET code without saving to file previously.
(Main reason is security, but also dont want to leave rubbish when program crashh etc)
Do you know how to archive that?