ramalaks
Level 6

rollback on upgrade install

I use IA 8.0.1 enterprise.

i write my custom code to compare version and do upgrade by using my rules.
How do i rollback during upgrade install upon any failure cases?

I understand that we have to write code for rollback. for complete uninstall duing firsttime install failure is easy that we remove everything and undo registries..

How to undo and rollback on upgrade? any idea/

How do undo registry modifications in IA? if i modified any existing registry and value and want to rollback upon failure..any java class/methods availeb to register the change and rollback automatically?
Labels (1)
0 Kudos
9 Replies
jerome_IA
Level 9

One way to be able to rollback in case of error is to backup all the data that are modified during upgrade. Copy those data before the upgrade starts.

Then in case of error, instead of uninstalling, you should be able to restore those saved data after you have deleted the failed one.

> How do undo registry modifications in IA ?
Are you talking about IA registry files or Windows registry ?
If IA:
Copy the full "uninstall" folder before proceeding with upgrade (So this is part of backup data above)
If windows registry:
The problem with the registry is that the "Set Windows Registry" Action cannot be performed in "Post-Install", Only read registry action. So you have to create your own script to set back windows registry in case of failure.

Hope I answered your questions ...
0 Kudos
ramalaks
Level 6

This is like writing our own installer. Does Installanywhere give anything for free?
0 Kudos
pv7721
Level 20

ramalaks wrote:
This is like writing our own installer. Does Installanywhere give anything for free?


The access to these forums?...
0 Kudos
qqqqqq
Level 7

So what is the way to rollback ?

I need .. if my installation fails in between .. i need to rollback all the changes.
deleting the main folder is OK.
What abt i need to do some custom changes like...
if installation fails.... delete the database created during the installation...

so this is same as running the uninstaller .. if installation fails.
0 Kudos
qqqqqq
Level 7

I tried .. if installation fails i ..delete the main folder...
but problem is with registry values.. IA makes its entries at the very start of the INSTALL phase.

how to delete the registry values made by the IA..?

OR ...if installtion fails, running the uninstaller is the only option?
0 Kudos
jerome_IA
Level 9

As in the Post-Install menu, you cannot edit windows registry but only read from it, you will have to do your own scripts to update/delete windows registry.

So you may get all registry entries in Pre-install and save values to be able to restore them later.

Same problem for shortcuts.
0 Kudos
qqqqqq
Level 7

ohh 😞 that's too much !
i am triggering uninstaller if installtion fails .... how good is this option ?


and can you give some pointers ...to modify registry values programatically ?
0 Kudos
jerome_IA
Level 9

I think calling uninstaller is the best way to match your rollback as it will remove all created entries.
It will also remove registry entries, thus you will have to recreate them like it was before the upgrade.

You will have to create a VBScript ... I found some good entries in the following link: http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/registry/

good luck ...
0 Kudos
qqqqqq
Level 7

Hey .. i just now got something helpful..
There are some api's by IA
RollbackHandler and RollbackRegister .. its says implement these.. and when installtion is canceled ... custom defined action is taken.

What is meant by 'cancel' here ? Is it only when user clicks CANCEL button ?
0 Kudos