大家好:我遇到一个问题,就是我在 运行 菜单 里面输入命令 : c:\python26\python26.exe D:\Prelaunch\local.package.py 11可以直接运行。可是我在asp.net程序中这样写(如下代码)就执行不了,请大家帮忙看看是哪的问题,谢谢大家了。ProcessStartInfo start = new ProcessStartInfo(@"c:\python26\python26.exe"); start.Arguments = @"D:\Prelaunch\local.package.py 11";
start.CreateNoWindow = false;
start.RedirectStandardOutput = true;
start.RedirectStandardInput = true;
start.UseShellExecute = false;
Process p = Process.Start(start);
start.CreateNoWindow = false;
start.RedirectStandardOutput = true;
start.RedirectStandardInput = true;
start.UseShellExecute = false;
Process p = Process.Start(start);
解决方案 »
- jmail自设发件人地址
- 网页播放器不能修改地址
- 引用dll有顺序码?——GAC,C:\Windows\Microsoft.NET\Framework\v4.0.30319和bin下面
- 时间段筛选 出现“无法绑定由多个部分组成的标识符”
- WIN8 怎么安装SQL2008
- 求助!当点击搜索"出现没有您查询的结果请重新输入"后出现的页面字体全变大了,原来的是12号的,为何会变大呢.?
- 大家好,问个有点难度得问题哈,至少,我还没baidu出来
- 请问,如何用ctrl+回车实现提交.
- file这个控件,为什么我在asp.net页面提交之后,但还是返回那个页面,file的所选的文件就没有了呢?
- asp.net让我欢喜让我忧!
- c/s模式下socket消息共享在b/s下如何实现
- 关于访问母板页中的变量
{
Process ps = new Process();
ps.StartInfo.FileName = "cmd.exe";
ps.StartInfo.RedirectStandardOutput = true;
ps.StartInfo.RedirectStandardInput = true;
ps.StartInfo.CreateNoWindow = true;
ps.StartInfo.UseShellExecute = false;
ps.StartInfo.StandardOutputEncoding = System.Text.Encoding.Default;
ps.StartInfo.RedirectStandardError = false;
ps.OutputDataReceived += new DataReceivedEventHandler(ps_OutputDataReceived); ps.Start();
ps.BeginOutputReadLine();
ps.StandardInput.WriteLine(@"dir c:\");
ps.StandardInput.Close();
ps.WaitForExit();
ps.Close();
}
static void ps_OutputDataReceived(object sender, DataReceivedEventArgs e)
{
if (e.Data == null)
{
return;
}
Console.Write(e.Data+"\n");
}
可以在winform里试试