如何在创建安装后在窗口前运行.exe [英] how to run .exe on front of the window after created setup

查看:100
本文介绍了如何在创建安装后在窗口前运行.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

推荐答案

你不能。



网络服务器绝对无法访问客户端以告诉它启动应用程序。这是因为它存在巨大的安全风险。
You can't.

The web server has absolutely no access to the client to tell it to launch an application. This is because it's a massive security risk.


这篇关于如何在创建安装后在窗口前运行.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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