我想从我的C#代码调用exe,在调用exe后我的c#应用程序应该关闭imediatly。 [英] I want to invoke exe from my C# code, after invoking the exe my c# application should be closed imediatly.
问题描述
我想从我的c#代码中调用exe。使用下面的代码,我可以做到这一点。
           
myProcess.StartInfo.FileName = @" C:\ MyApp\Setup.exe " ;;
              myProcess.StartInfo.UseShellExecute = true;
              myProcess.StartInfo.Verb =" runas";
                myProcess.StartInfo.CreateNoWindow = true;
              myProcess.Start();
但是我需要在exe文件调用和设置向导继续之后立即关闭我的应用程序(即c#app)。
谢谢
K.Arivazhagan
myProcess.StartInfo.FileName = @" C:\ MyApp\Setup.exe " ;;
myProcess.StartInfo.UseShellExecute = true;
myProcess.StartInfo.Verb =" runas";
myProcess.StartInfo.CreateNoWindow = true;
myProcess.Start();
Application.Current.Shutdown(); 跨度>
Hi,
I want to invoke the exe from my c# code . Using below code I can achieve this.
myProcess.StartInfo.FileName = @"C:\MyApp\Setup.exe";
myProcess.StartInfo.UseShellExecute = true;
myProcess.StartInfo.Verb = "runas";
myProcess.StartInfo.CreateNoWindow = true;
myProcess.Start();
But I need to close my application (that is c# app) immediately after the exe file invocation and setup wizard should continues.
Thanks
K.Arivazhagan
myProcess.StartInfo.FileName = @"C:\MyApp\Setup.exe";
myProcess.StartInfo.UseShellExecute = true;
myProcess.StartInfo.Verb = "runas";
myProcess.StartInfo.CreateNoWindow = true;
myProcess.Start();Application.Current.Shutdown();
这篇关于我想从我的C#代码调用exe,在调用exe后我的c#应用程序应该关闭imediatly。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!