Does it detects a failing installation

Topics: Developer Forum, User Forum
Coordinator
Mar 22, 2007 at 6:32 PM
Edited Mar 22, 2007 at 6:36 PM
How does the updater agent handles failed or cancelled installations?

Here's the scenario, the user chooses to update an app.
All the process occurs as specified in "How the updating process works" in the Reference Guide.
The Activation Manager starts the installation, but the user cancells it.
Then the Updater Anget saids it was installed succesfully.

The main problem is that if the user retries the update, it saids there are not updates available.

I have tried this and seems to be the default behavior.
Is there some way to change/extend this?

To extend it I tought of something like postInstall Conditions so we could use the same evaluation pattern to validate something was correctly installed. To change it I tought about trying to get the exit code from the windows installer (if possible), but maybe there's already some simpler solution.


Thanks in advance.
Coordinator
Mar 26, 2007 at 9:05 PM
Hi there!
First of all, thanks for your question. It's clearly a very good point.
The .cab files installation is performed thru an ActivationProcessor called “CABUpdateProcessor”. This component is responsible for installing and rollback the installation if there is something wrong during the process. Actually you can have an activation processors chain during the installation and if anything goes wrong the updater calls the OnError() method of each processor in order to rollback the failed installation.
In the scenario you present, if the user cancel the .cab installation the activation processor must throw a kind of “CancelledByUserException” to perform the rollback.
The cab is installed using the Process class. To verify if the cab installation has been performed successfully, we can use the ExitCode property.
HTH
-Joe
Coordinator
Mar 26, 2007 at 11:08 PM
Jose:

I tought it was something like that, so right now the block doesnt care about the exit code right? I'll do what I can, once it's done I will post the solution... I hope this helps someone else.