Click here to Skip to main content
15,890,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Coders,
Do you think it is possible for a programmer to write a program/plugin to get an output from a software task. Let me explain
For instance autoruns from sysinternals of microsoft outputs are displayed inside the software's GUI. So what I was thinking is writing and making some kind of merge with the software and obtain a .txt output (in a formated/organised manner). Is it possible ? How would I do that ?
While I'm asking to create my own plugin, I would like to say that the same program has an export .txt feature. BUT that txt output is not formated/organize...Is there a way to write some code again that can organize a .txt file content in a desired manner...
I hope you guyz can understand my request :)

(I AM NOT ASKING TO CRACK OR BREAK SOFTWARE LEGACY POLICY)
Posted

1 solution

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
 
Share this answer
 
v3
Comments
Maciej Los 3-Apr-14 17:26pm    
+5!
Sergey Alexandrovich Kryukov 3-Apr-14 18:19pm    
Thank you, Maciej.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900