We deploy a Java application using InstallAnywhere 2012.
The deployed application has a version notification mechanism, which pops up a website, and encourages the user to download and launch "new version" while the "old version" may still be running. There is a "please exit" dialog during this process but the users usually don't exit, and the act of installing "new version" typically only overwrites files which were not locked, which yields a non-working installation until the user does a clean re-install.
I'd like to modify the actual installer to bail if "old version" is currently running, asking the user to quit it first.
IA offers a way to "execute custom code" which can be pointed to a jar file. So I created a standalone runnable jar program that exits with code 0 if all is clear, or code 1 if "old version" is detected as running, relying on tasklist.exe's return and some string parsing. However, I can't seem to find a way to alter the course of the installer based on my program's output.
Has anyone else tried doing this in IA platform, and if successful, how did you go about it?
Configure a custom code action . Keep the following as reference.
After the custom code action , add a "Show Message Dialoge" . Add the rule for the action as
$OLD_VERSION_RUNNING$ equals true
In the action properties, you have cancel and exit option,on click of dialouge Button..
Hope this helps..