PDA

View Full Version : Rollback is not calling custom action during uninstall



keshriar
04-01-2010, 10:34 AM
I have a Basic Msi project just to copy few files in the target system. I have two install script function, MyFunction() and RemoveRegistry() function.

In the MyFunction() code I am creating a registry entry and after a successfull installation I am calling RemoveRegistry() function through a custom action (whose In script Execution sequence is Deffered Execution in System Context and Install Exec Sequence is After Publish Product). This RemoveRegistry() function is deleting the registry entry.

I have another custom action (whose In script Execution sequence is RollBack Execution in System Context and Install Exec Sequence is After Install Initialize) which calls the same RemoveRegistry() function but it is called if installation / un-installation is canceled in between, i.e. during Rollback.

But I found that if I am uninstalling the package from control panel --> Add Remove programs and if I cancel the uninstall process in between then the Rollback custom is not getting called i.e. the registry entry is still there.

I am stuck with this for a long time :mad: . I hope someone would be able to answer this.