使用 Install4J 下载并安装附加应用程序

发布于 2024-12-17 18:03:02 字数 205 浏览 2 评论 0原文

我正在使用 Install4J 为我的应用程序构建安装(我们将其称为 MainApp),并且它工作得很好。

为了能够使用 MainApp,您还需要安装我的第二个应用程序(我们称之为 SecondApp)。

我的问题是这样的。有没有办法让Install4J首先安装MainApp,然后作为安装的最后一步下载SecondApp(位于网络服务器上的exe文件)并执行它?

I'm using Install4J to build an installation for my application (lets call it MainApp), and it work great.

To be able to use MainApp, you also need to install my second application (lets call this one SecondApp).

My question is this. Is there a way to get Install4J to first install MainApp, and as the last step in the installation download SecondApp (an exe file located on a webserver) and execute it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

最近可好 2024-12-24 18:03:02

您可以通过向“安装”屏幕添加两个操作来完成此操作:

  • “下载文件”操作,用于下载“SecondApp”安装程序

  • “运行可执行文件或批处理文件”操作,用于执行它。选择“等待终止”属性以等待安装程序完成。

为了改善用户反馈,请在“运行可执行文件或批处理文件”操作之前添加以下两个操作:

  • “设置进度条”操作,并将“更改类型”设置为“设置为不确定状态”

  • “设置消息”操作,选择“使用状态”并将“状态消息”设置为“正在安装第二个应用程序...”< /p>

如果您不想保留“SecondApp”安装程序可执行文件,请使用 ${installer:sys.workingDir}/secondapp.exe 下载将其复制到安装程序的临时目录。当安装程序退出时,它将被自动删除。

You can do that by adding two actions to the "Installation" screen:

  • "Download file" action, for downloading the "SecondApp" installer

  • "Run executable or batch file" action, for executing it. Select the "Wait for termination" property to wait for the installer to complete.

To improve user feedback add the following two actions to before the "Run executable or batch file" action:

  • "Set the progress bar" action with "Type of change" set to "Set to indeterminate state"

  • "Set messages" action with "Use status" selected and "Status message" set to "Installing second app ..."

If you do not want to keep the "SecondApp" installer executable, use ${installer:sys.workingDir}/secondapp.exe to download it to the temporary directory of the installer. It will be deleted automatically when the installer exits.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文