简体   繁体   English

如何自动更新使用 Inno Setup 安装的应用程序

[英]How to automatically update an application installed with Inno Setup

I have an executable application setup.exe for Windows that I realized with Launch4j/Inno Setup based on Java.我有一个适用于 Windows 的可执行应用程序 setup.exe,我使用基于 Java 的 Launch4j/Inno Setup 实现。

I often frequently release new versions and bug fixes.我经常发布新版本和错误修复。

I would like to know if there is a mechanism to install updates automatically?我想知道是否有自动安装更新的机制?

Inno Setup does not have any built-in mechanism for implementing automatic updates. Inno Setup 没有任何用于实现自动更新的内置机制。

You need to implement that yourself:您需要自己实现:

  • Make your application check for new versions (against your application webpage?).让您的应用程序检查新版本(针对您的应用程序网页?)。 Eg on startup (on a background thread?)例如在启动时(在后台线程上?)
  • If the application detects a new version, make it download an installer to a temporary location.如果应用程序检测到新版本,请将安装程序下载到临时位置。
  • Make the application execute the downloaded installer.使应用程序执行下载的安装程序。 You can make the installer run in silent mode ( /silent switch).您可以让安装程序以静默模式运行( /silent开关)。 The application should close itself, to unlock any files it is using, to allow files update.应用程序应自行关闭,以解锁它正在使用的任何文件,以允许文件更新。

This approach will need the update installer to prompt for Administrator privileges.这种方法需要更新安装程序提示管理员权限。 If you need the update to proceed completely seamlessly, you will have to implement a service.如果您需要完全无缝地进行更新,则必须实施一项服务。 For that, see Deploying application with .NET framework without admin privileges .为此,请参阅在没有管理员权限的情况下使用 .NET 框架部署应用程序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM