我目前正在构建一个 WPF 应用程序。我希望能够选择一个二进制文件,使用命令提示符命令行参数将其解码为 .csv 文件,在我的应用程序中编辑其值,然后使用解码工具将其解码回二进制文件。我陷入困境,正在将我的命令行参数输入到命令提示符中。我用谷歌搜索了一些东西,但我只能找到有关如何从代码打开命令提示符的信息,而不是如何执行命令的信息。
任何帮助将不胜感激。
谢谢!
I'm currently building a WPF application. I want to be able to choose a binary file, decode it using the command prompt command line arguments into a .csv file, edit its value in my application then decode it back to a binary file using a decoding tool.The only part where I'm stuck at is entering my commandline arguments into the command prompt. I googled stuff, but I could only find information on how to open the command prompt from code and not how to execute a command.
Any help would be greatly appreciated.
thanks!
发布评论
评论(1)
checkout Process 类,它是 .NET 框架的一部分 - 有关更多信息和一些示例代码,请参阅 MSDN 上的文档。
编辑 - 根据评论:
示例代码
启动 7zip 并读取 StdOut一些示例链接的
http://support.microsoft.com/kb/305369/en-us
checkout Process class, it is part of the .NET framework - for more information and some sample code see its documentation at MSDN.
EDIT - as per comment:
sample code that start 7zip and reads StdOut
some links to samples: