本文介绍了如何在代码中运行一个小程序.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的代码中运行bat文件或exe文件.我正在使用Microsoft visual Studio2010.如果有人知道,请帮助我.
谢谢.

I want to run a bat file or a exe file in my code. I am using Microsoft visual Studio 2010. Please help me if someone knows that.
Thanks.

推荐答案

Process p = new Process();
p.StartInfo.Arguments = "MyCommandLineParameters";
p.StartInfo.FileName = "MyCommand";
p.Start();


ShellExecute(0,0,"myfile.bat",0,0,SW_SHOW)


这篇关于如何在代码中运行一个小程序.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 09:01