为用户自定义 updates.xml (Install4J)

Custom updates.xml for user (Install4J)

我正在尝试实现对每个用户的版本控制,问题是我只知道用户运行可执行文件时的 ID。 要做到这一点有一些选择,但我不知道 一个是最好的,如果它行得通:

选项 1: 在运行时将 URL 修改为 updates.xml。它可能是 url (http://server.com/updates.xml?client=1) or change the url (http://server.com/updates-1.xml) 上的一些变量。这是可能的?如何在我的应用程序的 install4J 上下文中设置此变量并使更新程序安装程序使用相同的上下文?

选项 2: 在我的应用程序的运行时,我手动下载了 updates.xml,但是如何在 install4j 上下文中保存名为 "updateDescriptor" 的安装程序变量?更新程序安装程序将使用我设置的相同 updateDescriptor 或将从 URL 再次下载 updates.xml?

选项 3: 与选项 2 相同,但保存在上下文变量上,我可以保存为应用程序文件夹中的文件,并将文件作为参数 like that 传递给 URL for updates.xml,但我怎么知道 文件夹中是否安装了应用程序?

非常感谢!

请看

install4j - file with update placed in my local directory

了解如何更改 URL 以便在运行时下载 updates.xml。