This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Rollback in installanywhere 8
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 29, 2008
01:31 PM
Rollback in installanywhere 8
Have anyone done a successfull rollback when install is failed? if so, pl explain how?.
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 02, 2008
09:39 AM
😞 no idea.. searching for the same 😞
Tell me if you find any way
Tell me if you find any way
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 11, 2008
11:48 AM
I've been able to do a rollback under most cases when the install fails. There are some caveats however.
I added custom code in the pre-install phase. The handler gets called in the pre-install and install phases but does not seem to get called during the post-install phase.
Code sample below. Not that the real work of the rollback handler is in the class YourRollbackHandler.
package com.install.installanywhere;
import com.zerog.ia.api.pub.CustomCodeAction;
import com.zerog.ia.api.pub.InstallException;
import com.zerog.ia.api.pub.InstallerProxy;
import com.zerog.ia.api.pub.RollbackRegister;
import com.zerog.ia.api.pub.UninstallerProxy;
public class CancelAction extends CustomCodeAction {
public void install(InstallerProxy proxy) throws InstallException {
RollbackRegister register = (RollbackRegister) proxy
.getService(RollbackRegister.class);
register.addHandler(new YourRollbackHandler());
}
@Override
public String getInstallStatusMessage() {
return null;
}
@Override
public String getUninstallStatusMessage() {
}
@Override
public void uninstall(UninstallerProxy proxy) throws InstallException {
}
}
I added custom code in the pre-install phase. The handler gets called in the pre-install and install phases but does not seem to get called during the post-install phase.
Code sample below. Not that the real work of the rollback handler is in the class YourRollbackHandler.
package com.install.installanywhere;
import com.zerog.ia.api.pub.CustomCodeAction;
import com.zerog.ia.api.pub.InstallException;
import com.zerog.ia.api.pub.InstallerProxy;
import com.zerog.ia.api.pub.RollbackRegister;
import com.zerog.ia.api.pub.UninstallerProxy;
public class CancelAction extends CustomCodeAction {
public void install(InstallerProxy proxy) throws InstallException {
RollbackRegister register = (RollbackRegister) proxy
.getService(RollbackRegister.class);
register.addHandler(new YourRollbackHandler());
}
@Override
public String getInstallStatusMessage() {
return null;
}
@Override
public String getUninstallStatusMessage() {
}
@Override
public void uninstall(UninstallerProxy proxy) throws InstallException {
}
}
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 26, 2008
09:59 AM
when does the code go to roll back handler?
Is it when pressing cancel? I want to rollback if the any failure occurs during my install/postinstall actions..how do i handle that.?
Is it when pressing cancel? I want to rollback if the any failure occurs during my install/postinstall actions..how do i handle that.?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 14, 2009
10:20 AM
even after rollback using rollbackHandler, i see the product in add/remove programs and in zero G registry. how do we handle this.
