卸载程序不会删除所有已安装的文件

时间:2018-02-01 10:25:16

标签: install4j

我们在卸载过程中遇到了一个奇怪的问题。 卸载程序完成后,用户自定义源和jre的某些部分仍然存在于系统上。在uninstaller.log中,它表示推迟删除其中一些文件,但不是全部。 有人知道为什么删除被推迟以及为什么不删除它们?

此外,并非在所有系统上都会发生,但每个系统都可以重现。例如,在我的开发人员计算机上,一切正常,但在新的虚拟机上出现问题。

[INFO] com.install4j.runtime.beans.actions.UninstallFilesAction [ID 29]: Execute action
       executing auto uninstall
       postponing deletion of C:\Program Files (x86)\mytool\jre\lib\rt.jar
       postponing deletion of C:\Program Files (x86)\mytool\.install4j\user.jar
       postponing deletion of C:\Program Files (x86)\mytool\.install4j\i4jruntime.jar
       postponing deletion of C:\Program Files (x86)\mytool\jre\lib\resources.jar
       postponing deletion of C:\Program Files (x86)\mytool\jre\lib\jsse.jar
       postponing deletion of C:\Program Files (x86)\mytool\jre\lib\charsets.jar
       postponing deletion of C:\Program Files (x86)\mytool\jre\lib\jce.jar
       postponing deletion of C:\Program Files (x86)\mytool\jre\lib\jfr.jar
       postponing deletion of C:\Program Files (x86)\mytool\.install4j\user\myaction.jar
       Execute action successful after 717 ms

我的第一个猜测是它与用户操作有关。但这是自动更新程序的一部分,根本不执行。

修改

添加操作后#34;检查运行进程"它仍然是相同的行为。

[INFO] com.install4j.runtime.beans.actions.misc.CheckRunningProcessesAction [ID 738]: Execute action
       Property additionalExecutables: null
       Property closeStrategy: Allow soft close
       Property message: install4j hat entdeckt, dass mytool zur Zeit ausgeführt wird.

Bitte schließen Sie jetzt die folgenden Instanzen, und klicken Sie auf "Wiederholen", um fortzufahren, oder auf "Abbrechen", um zu beenden.
       Property timeOut: 5000
       Property allowIgnore: false
       Property includeLaunchers: true
       Property rollbackSupported: true
       Execute action successful after 0 ms

我对此日志消息的假设是,没有正在运行的进程,因为操作在0秒后完成?

1 个答案:

答案 0 :(得分:1)

这意味着正在使用捆绑JRE的启动程序仍在运行。在这种情况下,JRE中的某些文件被锁定,无法删除它们。

在卸载程序中使用“检查正在运行的进程”操作,以便在执行“卸载文件”操作之前关闭所有启动程序。