process_cmd.StartInfo.UseShellExecute = false;是什么意思啊

 我来答
百度网友fe42743
2012-09-12
知道答主
回答量:9
采纳率:0%
帮助的人:8.8万
展开全部
UseShellExecute must be true if you set the ErrorDialog property to true.
The WorkingDirectory property behaves differently when UseShellExecute is true than when UseShellExecute is false. When UseShellExecute is true, the WorkingDirectory property specifies the location of the executable. If WorkingDirectory is an empty string, the current directory is understood to contain the executable.
When UseShellExecute is false, the WorkingDirectory property is not used to find the executable. Instead, it is used by the process that is launched and only has meaning within the context of the new process.
上面是MSDN原话,其实UseShellExecute 可以调用关联程序打开非可执行文件,如mp3;
如果为false时,就是直接启动进程,只能执行可执行文件,必须指定完整路径,如exe和com文件,并且可以重定向标准输入与输出。
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式