Calling console application from asp.net

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 08:26:39

I'm not sure about this but anyway you can try

  ProcessStartInfo startinfo = new ProcessStartInfo();   
    startinfo.FileName =@"D:\\Edefter\\EFaturaConsoleTxtParser\\bin\\Debug\\EFaturaConsoleTxtParser.exe";   
    startinfo.CreateNoWindow = true;   
    startinfo.UseShellExecute = true; 
    Process myProcess = Process.Start(startinfo);
    myProcess.Start();

While starting a process programmatically, the 'UserShellExcute' property must be 'false'. Otherwise, the CreateNoWindow property value gets ignored and new window is created.

Example:

 ProcessStartInfo startinfo = new ProcessStartInfo();
 startinfo.FileName = @"demoApplication.exe";
 startinfo.Arguments = "arg1 arg2";
 startinfo.CreateNoWindow = true;
 startinfo.UseShellExecute = false;
 Process myProcess = Process.Start(startinfo);

Source: http://msdn.microsoft.com

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!