You might be /very/ lucky and find someone here who can help you, but
you are looking in the wrong kind of forum. This is a Usenet group for
embedded development - hardware and software for electronics, primarily
with small microcontrollers. You are much more likely to get help from
a Windows programming Usenet group, discussion forum, website, etc.
It is rare in the Windows world for software to work well with pipes, or
even to work well with any other programs - Windows programs are
supposed to stand alone, not be building blocks in combination with
other programs.
Maybe you can find some software designed for automated testing of
Windows programs, where you can script sets of keypresses and mouse
clicks, in order to control the program?