Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 2

How to create installer that can do upgrades

I am having issues creating a Windows 2003/2008 R2 installer which can detect older versions of a product (based on registry key version information) and overlay that installation with that of the newer version. The manner in which I am attempting to do this is by running an external command to launch the uninstaller of the current installation (if the current installation is determined to be older). Then after that has completed, the installation of the newer version will take place. What happens on occasion however, is that this installation will take place before the uninstaller has completely finished it's task. Therefore, the uninstaller will delete files that are in the process of being laid-down by the installer. This results usually in a "jre" directory which is missing files or is completely absent alltogether. Anyone have an ideas as to how to go about this? Thanks.
Labels (1)
0 Kudos
2 Replies
Level 9

The jre installation is made by InstallAnywhere between pre-install & install phase, this is not something (AFAIK) you can handle by your own.

So if at the beginning of the install phase you run the uninstaller, then the jre gets deleted.

suggestion will be to not delete the jre on uninstallation:
- checkbox in "Project/java" => Do not remove bundled VM when uninstalling
Then add an action (uninstall phase) to delete the jre on uninstall using a variable rule (e.g. DELETE_JRE=true by default)
When you call the uninstaller from the installer (upgrade), add the "-DDELETE_JRE=false" to the uninstaller command.

So the jre will be updated on upgrade and deleted on uninstallation.
0 Kudos
Level 4

Are you using the ExecuteUninstaller Action?

You could do that in the Pre-Install phase, run it in silent mode, and put the "Show Intermediate Dialog" option on. Then it wouldn't even proceed to the Install phase until it was completed.
0 Kudos