izPack 创建的卸载程序在 Windows“程序和功能”中不起作用
我正在使用 izPack 4.3.4 为 java 项目开发图形安装程序,安装进展顺利,但是当我尝试通过单击“程序和功能”窗口中的参考来卸载它时,它会显示以下消息:
Error: Unable to access jarfile C:\Program Files (x86)\myproject\uninstaller\uninstaller.jar
事实是我选择将卸载程序放在程序的根安装路径中并重命名,而不是放在 \uninstaller 目录中。请参阅 XML:
<info>
...
<uninstaller name="uninstall.jar" write="yes" path="${INSTALL_PATH}" />
...
</info>
事实上,uninstall.jar 文件是在 C:\Program Files (x86)\myproject\ 中创建的,如果我双击它或通过“开始”菜单,它就可以工作。我认为 izpacks 在 Windows 注册表中写入了错误的数据以在“程序和功能”中引用它...但我不知道为什么...
I'm working on a graphic installer for a java project using izPack 4.3.4, the installation goes well but when I try to uninstall it by clicking on his reference in "Programs and Features" window it shows the message:
Error: Unable to access jarfile C:\Program Files (x86)\myproject\uninstaller\uninstaller.jar
The fact is that I choosed to put and rename the uninstaller in the root install path of my program and not in \uninstaller dir. See the XML:
<info>
...
<uninstaller name="uninstall.jar" write="yes" path="${INSTALL_PATH}" />
...
</info>
And, in fact, uninstall.jar file is created in C:\Program Files (x86)\myproject\ and it works if I double click on it or throught the Start Menu. I think izpacks writes the wrong data in the Windows's registry to reference it in "Programs and Features"... but I don't know why...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您在 Windows 上使用 IZPack 进行安装,您可以(应该)拥有一个RegistrySpec.xml。那家伙写了你需要的所有注册表项。 Windows 会查找注册表值“UninstallString”作为要运行的文件来启动卸载,并且您可能需要覆盖该文件。以我的为例:
If you're installing using IZPack on Windows, you can (should) have a RegistrySpec.xml. That guy writes all the registry entries you need. Windows looks for a Registry Value "UninstallString" as the file to run to kick off your uninstall, and you likely need to overwrite that. For example on mine: