在应用程序运行时替换exe文件 [英] Replace exe file when application is running

查看:213
本文介绍了在应用程序运行时替换exe文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的问题-运行时是否可以替换* .exe文件(应用程序文件)?我的意思是我知道当应用程序运行时我无法做到这一点,但是也许可以执行以下操作: 做application.shutdown() 替换oldExe-> newExe application.restart().

I have simple question - is it possible, to replace *.exe file (application file), when it's running? I mean i know that i cannot do that when app is running, but maybe it's possible to do something like: do application.shutdown() replace oldExe -> newExe application.restart().

推荐答案

创建一个辅助应用程序.您将在需要时运行此帮助程序"应用程序,并且在关闭主应用程序后,它可以监视/替换主应用程序.替换后,助手应用程序可以再次启动您的主应用程序.

Create a helper application. You will run this "helper" application when you need it, and it can monitor/replace the main application when it has been closed. Once replaced, the helper application can launch your main application again.

您还可以在助手应用程序中运行命令行参数,告诉它您需要执行的操作.

You can also run command line arguments to your helper app, telling it what you need it to do.

这篇关于在应用程序运行时替换exe文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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