IzPack creates an uninstaller that does not work in Windows "Programs and Features",

I am working on a graphical installer for a java project using izPack 4.3.4, the installation is going well, but when I try to remove it by clicking on the link in the "Programs and Features" window, a message appears:

Error: Unable to access jarfile C:\Program Files (x86)\myproject\uninstaller\uninstaller.jar 

The fact is that I decided to install and rename the uninstaller to the root installation path of my program, and not to the \ uninstaller directory. See XML:

 <info> ... <uninstaller name="uninstall.jar" write="yes" path="${INSTALL_PATH}" /> ... </info> 

And, in fact, the uninstall.jar file is created in C: \ Program Files (x86) \ myproject \, and it works if I double-click on it or in the Start menu. I think izpacks writes the wrong data to the Windows registry to refer to it in "Programs and Features" ... but I don't know why ...

+4
source share
1 answer

If you install using IZPack on Windows, you can (should) have RegistrySpec.xml. This guy writes all the necessary entries in the registry. Windows is looking for the “UninstallString” registry value as the startup file to start the uninstall, and you may have to overwrite it. For example, on mine:

 <pack name="UninstallStuff"> <!-- Special "pack", if not defined an uninstall key will be generated automatically --> <value name="UninstallString" keypath="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$APP_NAME" root="HKLM" string="$INSTALL_PATH\uninstall\uninstaller.cmd"/> <pack name="UninstallStuff"> 
+1
source

All Articles