I'm trying to retrieve the standard output from a little command line tool that I wrote (in .NET too) by starting a process with it like this.
It works perfectly except if my command line tool tries to retrieve the Console.CursorTop
property, or tries to set the Console.CursorVisible
property. In those cases, it crashes.
I don't understand why this is happening, other methods or properties of Console
might work but some like theses don't. Is there some kind of hidden Cursor
object in Console
that never get initialized if started that way?
This tool works fine if I launch it from the explorer or if I run it in a cmd.
Could someone explain me why it happens and how I can prevent it? Thanks.