本文介绍了如何在创建安装后在窗口前运行.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好我正在开发一个webapplication,因为我想通过process.start()方法访问一个exe。它在本地运行后显示在桌面上,但是当我创建该Web应用程序的设置时,它将作为后台进程运行,或者我们可以在taskmanager中看到。
所以,我需要打开exe(应用程序)on前面(桌面)。
这是我的代码:
Hello i am working on one webapplication in that i want to access one exe through process.start() method. It is showing on desktop after run locally, but when i created setup of that web application it will run as background process or we can see in taskmanager.
so, i need to open exe(application)on front (desktop).
This is my code:
string apppath="C:\OpscentralTool\Release\OpsCentralComponent.exe";
ProcessLocal processloc = new ProcessLocal();
string AgentExeName = System.Web.Configuration.WebConfigurationManager.AppSettings["OpsToolExeName"];
var getlocal = processloc.AgentLocalProperties(AgentExeName);
if (getlocal.AgentName == AgentExeName)
{
flag = true;
}
else
{
processloc.CreateProcess(apppath);
if (CheckLocalAgent())
{
flag = true;
}
else
{
flag = false;
}
}
预付Thanx
Thanx in advance
推荐答案
这篇关于如何在创建安装后在窗口前运行.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!