How do I check if the installed program is running at the beginning of the install4j uninstaller?

感情迁移 提交于 2019-12-24 07:45:37

问题


I have a Java program (Eclipse RCP in case that matters) that is installed and uninstalled with install4j. This works fine, except that the uninstaller will happily uninstall (most of) my program while it is running, leading to an incomplete uninstall and a program crash (with potential data loss).

I would like the uninstaller to check whether the program is running before deleting any files, and prompt the user to exit the program if necessary.

I could not find any options to supports this in the install4j documentation or forums.

On stackoverflow I found answers for NSIS and Inno, but not for install4j.

Can this be done with install4j, or do I need custom code? Do I have to make my program react to requests/messages to make it detectable?


回答1:


You can add a "Check for running processes" action before the "Uninstall files" action.



来源:https://stackoverflow.com/questions/54476403/how-do-i-check-if-the-installed-program-is-running-at-the-beginning-of-the-insta

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!