【问题标题】:install4j - Where is the current version of application stored?install4j - 当前版本的应用程序存储在哪里?
【发布时间】:2021-06-07 14:34:20
【问题描述】:

我们的 RCP 应用程序使用 intall4j 进行安装。我们的客户要求我们安装程序不应将任何条目写入注册表。为此我们从安装步骤中删除了“注册添加/删除项目”操作。 但是,每当自动更新尝试在应用程序启动之前安装更新时,安装程​​序就会进入无限循环,其中自动更新后更新再次被触发。我们认为这是因为自动更新安装程序尚未更新当前版本的应用程序,因此即使在更新后,启动器仍会再次重新启动自动更新程序。 这是否意味着 install4j 安装的应用程序的当前版本来自 Registry。有可能改变吗?

@英戈, 我已启用日志。 PFB 自动更新程序的日志:

sun.cpu.isalist=amd64
[INFO] Variable changed: sys.resolveUserSpecificInstallationDir=true[class java.lang.String]
[INFO] com.install4j.runtime.beans.actions.control.RunScriptAction [ID 1337]: Execute action
       Property rollbackScript: null
       Property script: com.install4j.script.I4jScript_Internal_12
       Property rollbackSupported: false
       Execute action successful after 15 ms
[INFO] com.install4j.runtime.beans.actions.misc.LoadResponseFileAction [ID 1338]: Execute action
       Property excludedVariables: null
       Property file: null
       Property overwriteStrategy: Do not overwrite command line
       Property registerForResponseFile: true
       Property rollbackSupported: false
       Variable changed: sys.adminRights=false[class java.lang.Boolean]
       Variable changed: sys.languageId=de[class java.lang.String]
       Variable changed: guiws_url=https://flexprod.telekom.de/guisrv/services/[class java.lang.String]
       Variable changed: updates_fullurl=http://qde1y9.de.t-internal.com/rcp/prod_test/updates.xml[class java.lang.String]
       Variable changed: sys.installationDir=C:\Users\cts02\AppData\Local\FxPRCPGuiClient\FlexProd_prod[class java.lang.String]
       Variable changed: sys.component.423=true[class java.lang.Boolean]
       Variable changed: sys.component.400=true[class java.lang.Boolean]
       Execute action successful after 0 ms
[INFO] com.install4j.runtime.beans.actions.update.CheckForUpdateAction [ID 1339]: Execute action
       Property connectTimeout: 10000
       Property connectionFailureScript: null
       Property readTimeout: 20000
       Property requestHeaders: []
       Property url: http://qde1y9.de.t-internal.com/rcp/prod_test/updates.xml
       Property variable: updateDescriptor
       Property acceptAllCertificates: false
       Property askForProxy: true
       Property rollbackSupported: false
       Property showError: true
       Download: http://qde1y9.de.t-internal.com/rcp/prod_test/updates.xml to C:\Users\cts02\AppData\Local\Temp\518\i4jupd8246635060036627292.xml; size: 483 bytes
       Variable changed: updateDescriptor=com.install4j.runtime.installer.config.update.UpdateDescriptorImpl@327471b5[class com.install4j.runtime.installer.config.update.UpdateDescriptorImpl]
       Execute action successful after 313 ms
[INFO] com.install4j.runtime.beans.actions.control.RunScriptAction [ID 1437]: Execute action
       Property rollbackScript: null
       Property script: com.install4j.script.I4jScript_Internal_13
       Property rollbackSupported: false
       Current Version during Updatecheck = 7.100.11.03
       upDesc = com.install4j.runtime.installer.config.update.UpdateDescriptorImpl@327471b5
       New Version during Updatecheck = 7.200.00.41
       isUpdateRequired = true
       Variable changed: isUpdateRequired=true[class java.lang.Boolean]
       Execute action successful after 0 ms
[INFO] com.install4j.runtime.beans.actions.control.SetVariableAction [ID 1340]: Execute action
       Property script: com.install4j.script.I4jScript_Internal_14
       Property variableName: updateDescriptorEntry
       Property failIfNull: true
       Property onlyIfUndefined: false
       Property responseFileVariable: false
       Property rollbackSupported: false
       Variable changed: updateDescriptorEntry=UpdateDescriptorEntry [target: 689, file: FlexProd_64Bit.exe][class com.install4j.runtime.installer.config.update.UpdateDescriptorEntryImpl]
       Execute action successful after 0 ms
[INFO] com.install4j.runtime.beans.actions.control.SetVariableAction [ID 1342]: Execute action
       Property script: com.install4j.script.I4jScript_Internal_16
       Property variableName: updaterNewVersion
       Property failIfNull: false
       Property onlyIfUndefined: false
       Property responseFileVariable: false
       Property rollbackSupported: false
       Variable changed: updaterNewVersion=7.200.00.41[class java.lang.String]
       Execute action successful after 0 ms
[INFO] com.install4j.runtime.beans.actions.control.SetVariableAction [ID 1343]: Execute action
       Property script: com.install4j.script.I4jScript_Internal_17
       Property variableName: updaterDownloadUrl
       Property failIfNull: false
       Property onlyIfUndefined: false
       Property responseFileVariable: false
       Property rollbackSupported: false
       Variable changed: updaterDownloadUrl=http://qde1y9.de.t-internal.com/rcp/prod_test/FlexProd_64Bit.exe[class java.lang.String]
       Execute action successful after 0 ms
[INFO] com.install4j.runtime.beans.actions.control.SetVariableAction [ID 1344]: Execute action
       Property script: com.install4j.script.I4jScript_Internal_18
       Property variableName: updaterDownloadFile
       Property failIfNull: false
       Property onlyIfUndefined: false
       Property responseFileVariable: false
       Property rollbackSupported: false
       Variable changed: updaterDownloadFile=C:\Users\cts02\AppData\Local\install4j\update\RmxleFByb2Q=\JdUUEq0txyEdauSNfbR1Vm8987g=\FlexProd_64Bit.exe[class java.lang.String]
       Execute action successful after 16 ms
[INFO] com.install4j.runtime.beans.actions.net.DownloadFileAction [ID 1345]: Execute action
       Property connectTimeout: 10000
       Property connectionFailureScript: null
       Property digestAlgorithm: SHA-256
       Property digestUrl: 
       Property readTimeout: 20000
       Property requestHeaders: []
       Property targetFile: C:\Users\cts02\AppData\Local\install4j\update\RmxleFByb2Q=\JdUUEq0txyEdauSNfbR1Vm8987g=\FlexProd_64Bit.exe
       Property url: http://qde1y9.de.t-internal.com/rcp/prod_test/FlexProd_64Bit.exe
       Property acceptAllCertificates: false
       Property askForProxy: true
       Property checkDigest: false
       Property deleteOnExit: false
       Property dontAskForRetry: false
       Property retryIfInterrupted: true
       Property rollbackSupported: false
       Property showError: true
       Property showFileName: true
       Property showProgress: true
       Download: http://qde1y9.de.t-internal.com/rcp/prod_test/FlexProd_64Bit.exe to C:\Users\cts02\AppData\Local\install4j\update\RmxleFByb2Q=\JdUUEq0txyEdauSNfbR1Vm8987g=\FlexProd_64Bit.exe; size: 116123648 bytes
       Execute action successful after 3987 ms
[INFO] com.install4j.runtime.beans.actions.files.SetModeAction [ID 1347]: Execute action
       Property directoryFilter: null
       Property fileFilter: null
       Property fileTarget: everything
       Property files: [C:\Users\cts02\AppData\Local\install4j\update\RmxleFByb2Q=\JdUUEq0txyEdauSNfbR1Vm8987g=\FlexProd_64Bit.exe]
       Property filesRoot: null
       Property mode: 755
       Property recursive: false
       Property rollbackSupported: true
       Property showFileNames: true
       Property showProgress: false
       Execute action successful after 0 ms
[INFO] com.install4j.runtime.beans.actions.update.ScheduleUpdateAction [ID 1348]: Execute action
       Property arguments: null
       Property installerFile: C:\Users\cts02\AppData\Local\install4j\update\RmxleFByb2Q=\JdUUEq0txyEdauSNfbR1Vm8987g=\FlexProd_64Bit.exe
       Property maxCancelCount: 10
       Property maxTries: 3
       Property version: 7.200.00.41
       Property rollbackSupported: false
       Execute action successful after 47 ms
[INFO] com.install4j.runtime.beans.actions.control.RunScriptAction [ID 1349]: Execute action
       Property rollbackScript: null
       Property script: com.install4j.script.I4jScript_Internal_20
       Property rollbackSupported: false
[ERROR] com.install4j.runtime.beans.actions.control.RunScriptAction [ID 1349]: no shutdown file property
[INFO] com.install4j.runtime.beans.actions.control.RunScriptAction [ID 1349]: execute directly
       cleaning up
       Finished

我在 bgupdater 执行后检查了 i4jparams.conf 文件。 “sys.version”所代表的版本仍然指向旧版本。

【问题讨论】:

  • 版本不在注册表中,而是在<installation directory>/.install4j/i4jparams.conf中。使用参数-Dinstall4j.log=<path to writable log file> 启动更新下载器,然后您会看到它为什么再次下载更新。
  • @IngoKegel,我已经更新了上面的日志。运行我的更新程序后,我可以看到 conf 文件中的版本仍然相同。
  • 我还可以看到错误 "com.install4j.runtime.beans.actions.control.RunScriptAction [ID 1349]: no shutdown file property" 。我已经使用 'UpdateChecker.executeScheduledUpdate(Arrays.asList("-q", "-splash", "Updating ..."), true, null);'的脚本立即启动了 bgupdater
  • 你确定下载的安装程序真的执行了吗?文件<installation directory>/.install4j/i4jpara,s.com 更新了吗?另外,下载的安装程序是普通安装程序而不是“附加”安装程序吗?
  • 是的,我手动执行了 .install4j 文件夹中的 bgupdater.exe。不,参数文件根本没有更新。它是常规安装程序,而不是附加安装程序

标签: install4j auto-update


【解决方案1】:

我的安装程序本身的问题。在更新安装期间,更新安装程序实际上将应用程序安装在不同的位置,因为在更新期间有使用 context.setInstalltionDirectory 设置安装目录的附加说明。
因此,安装本身进入了无限循环。一旦我删除了这个不必要的步骤,问题就得到了纠正。 谢谢。

【讨论】:

    猜你喜欢
    • 2016-04-18
    • 2012-02-22
    • 1970-01-01
    • 2013-11-20
    • 2021-05-03
    • 2010-09-23
    • 2021-08-17
    • 2017-04-02
    • 1970-01-01
    相关资源
    最近更新 更多