StartInfo没有结束 [英] StartInfo is not ending

查看:62
本文介绍了StartInfo没有结束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

 

我有这段代码:

process1 = new System.Diagnostics.Process();
$
process1.StartInfo.FileName = @" c:\program files(x86)\ Capphyon \Advanced Installer 8.6\bin\x86 \Advancedinstaller.com" ;; $
process1.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
$
process1.StartInfo.UseShellExecute = false;

process1.StartInfo.CreateNoWindow = true;
$


//运行命令

process1.StartInfo.Arguments = command;

process1.Start();

process1 = new System.Diagnostics.Process();
process1.StartInfo.FileName = @"c:\program files (x86)\Caphyon\Advanced Installer 8.6\bin\x86\Advancedinstaller.com ";
process1.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
process1.StartInfo.UseShellExecute = false;
process1.StartInfo.CreateNoWindow = true;

// run the command
process1.StartInfo.Arguments = command;
process1.Start();

process1.WaitForExit();

process1.Kill();

process1.WaitForExit();
process1.Kill();

 

问题是,这段代码在云中完美运行,但我在测试环境中运行并且一直无法运行,因为不稳定因为有时不会在"任务管理器"中结束该过程。我认为IIS可能存在问题(因为
这是在ASP.NET应用程序下运行),但为什么有时运行正常?

The problem is, this code is running perfectly in the cloud, but I have it in our testing environment and is not working all the time, is unstable because sometimes is not ending the process in the "Task Manager". I think could be a problem with IIS (because this is running under an ASP.NET app), but why is running OK sometimes?

我有办法吗? span id ="x_result_box"lang ="en"> 保证
杀死 此过程始终如何?

Do i have some way to guarantee to kill the process all the time?

 



 

 

 

推荐答案

你是确定程序已完成执行?  若然,您如何确定?

Are you sure that the program is done executing?  If so, how are you sure?

该程序是否可能正在等待某种用户输入?

Is it possible that the program is waiting for some sort of user input?


这篇关于StartInfo没有结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆