如何停止应用程序以进行自我更新? [英] How to stop an application for a self-update?

查看:49
本文介绍了如何停止应用程序以进行自我更新?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用需要能够自我更新.为此,当我点击应用程序的更新开始安装时,它应该在安装完成后停止并重新启动.Windows 可以以某种方式为我做到这一点吗?

My app needs to be able to update itself. In order to do so, when I click on the app's update to start the installation, it should stop and restart after installation is complete. Can Windows do that for me somehow?

推荐答案

您可以将您的应用程序分成两部分:main applicationupdater.您可以从主应用调用更新程序(并停止主应用),执行所有更新操作,然后从更新程序重新启动主应用程序.

You can split your application into 2 parts: main application and updater. You can call the updater from the main app (and stop the main app), do all the update stuff, then relaunch the main app from the updater.

这篇关于如何停止应用程序以进行自我更新?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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