yeah,
I'v read the above links over and over again. it;s almost engraved in my mind
Anyway, this my present situation:
Case 1:
I analyzed your test.zip. Did the same thing as in your Java Custom Action.aip; using aicustact.dll & java.exe search.
As mentioned above, I need this CustomAction to be executed during an UPDATE alone.
But for a 'Launch attached file' there is no 'Execution Stage Condition' where i can set it must happen ONLY during an UPDATE.
Case 2:
I reverted back to calling the JAR file, through a BAT file. Both these files are in the APPDIR; so i used a 'Launch installed file' to invoke the BAT file.
This custom Action is scheduled in the 'Final Dialog Stage' -> 'Finish Execution'.
This I got working during an update as required.
But the problem is a rollback if the action fails.
For this, as seen in the test.zip; i added the System.exit(3) in my java code incase an exception occured.
BUT, though a pop-up shows a component in the installation has failed, the update is NOT ROLLEDBACK.
WHY IS THIS SO?
Case 3:
I assumed the above problem is cuz the CustomAction is executed too late in the sequence.
As the custom action relies on files in the APPDIR, I advanced this custom action from 'Final Dialog Stage' : 'Finish Execution' TO 'Install Execute Stage' -> 'Add Resources'
In this scenario, the new JAR is NOT getting executed.
I mean; remember this is a UPDATE process. i.e. there is already an old JAR in the APPDIR(from the original installation). This old JAR is getting executed instead of the new one.
now. please advice me on how I can proceed.