插件导出软件输出 [英] Plugin to export software output

查看:96
本文介绍了插件导出软件输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨编码器,

您是否认为程序员可以编写程序/插件来获取软件任务的输出。让我解释一下

例如,来自 microsoft sysinternals autoruns 显示在软件的GUI中。所以我在想的是编写并与软件进行某种合并并获得.txt输出(以格式化/有组织的方式)。可能吗 ?我该怎么做?

虽然我要求创建自己的插件,但我想说同一个程序有一个导出.txt功能。但是txt输出没有格式化/组织...是否有办法再次编写一些代码,可以以所需的方式组织.txt文件内容...

我希望你guyz可以理解我的要求:)



(我不是要求破解或破坏软件遗留政策)

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)

推荐答案

对于这个应用程序,它非常简单。而不是 autoruns.exe ,只需使用 autorunsc.exe (仅限控制台版本的autoruns)。



要使用控制台从某些应用程序的某些控制台收集输出,请使用 System.Diagnostics.Process.Start ,重定向 StandardOutput (以及,以防万一, StandardError )并读取主机应用程序中的控制台输出。您可以在此处找到有关如何执行此操作的代码示例:

http://msdn.microsoft.com/en-us/library/vstudio/system.diagnostics.process.standardoutput [ ^ ]。



As对于其他应用程序,它取决于。没有任何捕获应用程序输出的通用方法。如果它们不是为任何类型的协作而设计的,最好不要尝试它:一般情况下,这很难做到,结果不可靠;这样的解决方案不会真正得到支持。流程彼此很好地隔离。如果它们不是为协作而设计的,那么它们就不会。许多初学者的常见错误是试图获得现有应用程序的好处,给人的印象是他们可以轻松地重用它们。这只是误解。



-SA
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


这篇关于插件导出软件输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆