问题描述
我们的 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”代表的版本仍然指向旧版本。
解决方法
我的安装程序本身的问题。在更新安装期间,更新安装程序实际上是在不同的位置安装应用程序,因为在更新期间有额外的指令来使用 context.setInstalltionDirectory 设置安装目录。
因此,安装本身进入了无限循环。一旦我删除了这个不必要的步骤,问题就得到了纠正。
谢谢。