Replace exe file when application is running [dupl

2019-06-27 07:02发布

This question already has an answer here:

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().

标签: c# replace exe
1条回答
神经病院院长
2楼-- · 2019-06-27 07:43

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.

查看更多
登录 后发表回答