Community Forums
Results 1 to 5 of 5

Thread: Rollback in installanywhere 8

  1. #1
    Join Date
    Jan 2006
    Posts
    72

    Thumbs down Rollback in installanywhere 8

    Have anyone done a successfull rollback when install is failed? if so, pl explain how?.

  2. #2
    Join Date
    Sep 2008
    Posts
    140

    Unhappy

    no idea.. searching for the same
    Tell me if you find any way

  3. #3
    Join Date
    Nov 2008
    Posts
    1

    Doing Rollback

    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 {
    }
    }

  4. #4
    Join Date
    Jan 2006
    Posts
    72
    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.?

  5. #5
    Join Date
    Jan 2006
    Posts
    72
    even after rollback using rollbackHandler, i see the product in add/remove programs and in zero G registry. how do we handle this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •