For this very application, it's quite simple. Instead of
autoruns.exe
, just use
autorunsc.exe
(a console-only version of autoruns).
To collect the output from some console of some application using the console, use
System.Diagnostics.Process.Start
, redirect
StandardOutput
(and, just in case, also
StandardError
) and read the console output in your host application. You can find the code sample on how to do it here:
http://msdn.microsoft.com/en-us/library/vstudio/system.diagnostics.process.standardoutput[
^].
As to other applications, it depends. There is no any universal method of capturing output of the applications. If they are not designed for any kind of collaboration, it's better not to try it: in general case, this is difficult to do and the result won't be reliable; such "solutions" won't be really supportable. Processes are well isolated for each other. If they are not designed for collaboration, they won't. It's a common mistakes of many beginner to try to get benefits of existing application, having the impression that they can easily "reuse" them. This is just the misconception.
—SA