新人提问:调用批处理时的cmd窗口问题 调用批处理或可执行文件时,cmd窗口会闪烁一下(出现cmd窗口马上就消失)请问高手们指点下,怎样做才能使他不闪烁。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如果是C#写的可执行文件,在最后加一句:System.Console.ReadLine(); 谢了可能我说的不是很清楚,我是想执行的时候直接不出现cmd窗口 批處理實例Rem Test@each offprint 'ss'pause@each onC#可執行文件﹐在文件尾加上一句:System.Console.ReadLine(); 以前看帖有人说用p.StartInfo.CreateNoWindow=true;但是我试过了,没效果 不要直接点它,到cmd.exe中运行 我刚才解决了。 Process process=new Process(); process.StartInfo.FileName="a.bat"; process.StartInfo.UseShellExecute=false; process.StartInfo.RedirectStandardInput = true; process.StartInfo.RedirectStandardOutput = true; process.StartInfo.RedirectStandardError = true; process.StartInfo.CreateNoWindow = true; Process.Start(); 不好意思,没理解你说的我是用C#调用一个EXE文件(不是c#写的)System.Diagnostics.ProcessStartInfo ps=new ProcessStartInfo("my.exe");System.Diagnostics.Process p=new System.Diagnostics.Process();p.StartInfo.CreateNoWindow=true;p.StartInfo=ps;p.start(); System.Diagnostics.ProcessStartInfo ps=new ProcessStartInfo("my.exe");System.Diagnostics.Process p=new System.Diagnostics.Process(); p.UseShellExecute=false; p.RedirectStandardInput = true; p.RedirectStandardOutput = true; p.RedirectStandardError = true;p.StartInfo.CreateNoWindow=true;p.StartInfo=ps;p.start(); 请教一个日期转换问题,急!!!在线等.. 数字证书读取 Winform Winform获取IE的当前网页URL 救急 我的vs2005 为何没有 system.windows 很大的麻烦 如何从SQL数据库中获取图片 关于取时间差距的问题! c#发邮件正文如果是汉字就变成乱码 test 求8个 不重复的 随机数 求大神帮忙 LC.exe 未能运行 文件名或扩展名太长 中文显示问题 c# 怎样将十六进制转换成十进制??
System.Console.ReadLine();
可能我说的不是很清楚,我是想执行的时候直接不出现cmd窗口
Rem Test
@each off
print 'ss'
pause
@each onC#可執行文件﹐在文件尾加上一句:
System.Console.ReadLine();
但是我试过了,没效果
Process process=new Process();
process.StartInfo.FileName="a.bat";
process.StartInfo.UseShellExecute=false;
process.StartInfo.RedirectStandardInput = true;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.CreateNoWindow = true;
Process.Start();
System.Diagnostics.Process p=new System.Diagnostics.Process();
p.StartInfo.CreateNoWindow=true;
p.StartInfo=ps;
p.start();
System.Diagnostics.Process p=new System.Diagnostics.Process();
p.UseShellExecute=false;
p.RedirectStandardInput = true;
p.RedirectStandardOutput = true;
p.RedirectStandardError = true;
p.StartInfo.CreateNoWindow=true;
p.StartInfo=ps;
p.start();