自我更新 [英] Self Updating

查看:95
本文介绍了自我更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

终止程序然后从正在终止的程序中运行其他代码的最佳方法是什么?例如,程序自我更新的最佳方式是什么?

What's the best way to terminate a program and then run additional code from the program that's being terminated? For example, what would be the best way for a program to self update itself?

推荐答案

您有几个选择:

您可以使用另一个应用程序 .exe 进行自动更新.这可能是最好的方法.

You could use another application .exe to do the auto update. This is probably the best method.

您还可以在程序运行时重命名程序的 exe.因此允许您从某个更新服务器获取文件并替换它.在程序下次启动时,它将使用新的 .exe.然后,您可以在启动时删除重命名的文件.

You can also rename a program's exe while it is running. Hence allowing you to get the file from some update server and replace it. On the program's next startup it will be using the new .exe. You can then delete the renamed file on startup.

这篇关于自我更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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