Thursday, April 4, 2019

Is there a Windows program for loading child process images with redirected stdout/stderr?

I have a program that has stdout and stderr available, so it can and does write important output on these channels. You only see this output when you e.g. launch it from a Windows console window, through typically the command interpreter or Powershell, otherwise obviously you don't have any place you can see said output.


Since this program also works without an attached console window and since it's otherwise a GUI application, I would rather avoid users to be confused about parent or attached console -- the program is best used without one, for all use cases except debugging.


Now, I want to be able to obtain the output nevertheless, even when there is no console window used. I am a big vague on specifics of process file handle management in Windows.


Is there any program available that is designed to launch a program as subprocess, with stdout and stderr redirected to a file or multiple files?


I know that the good old command interpreter and Powershell let you do that, but they only do that with a console window, and I want something that has no such window. A Visual Basic script host, perhaps? Is that still en vogue? Any other solutions?

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...