Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

how to differentiate rollback action and uninstall


3 replies to this topic

krishna123

krishna123
  • Members
  • 11 posts

Posted 10 November 2005 - 09:06

Hi,

how to differentiate rollback action and uninstall action.

I have a need to do invoke different Custom actions for rollback and uninstall actions.

I am installing SQL Express, .Netframwork in bootstrapper method. Bootstrapper will search for them on a machine if not exists it will install them.

After installing SQLExpress, .Netframework on demand bootstrapper will launch our MSI. While running this MSI if user select option for cancel then we should Uninstall the softwares those are installed by bootstrapper.

If user uninstalls after completion of the entire installation we have to uninstall the files those are installed by our MSI not the bootstrapper installed softwares.


Please suggest a better way to handle this

Thanks a lot
krishna

Edited by krishna123, 10 November 2005 - 10:41.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 10 November 2005 - 10:41

For rollback create a custom action of type "rollback" and sequence it between InstallInitialize and InstallFinalize.
For uninstall use a condition like REMOVE~="ALL" on your custom action.
Note that rollback might also happen during uninstall (if uninstall fails). Your rollback action should have the same condition as its associated regular action.

krishna123

krishna123
  • Members
  • 11 posts

Posted 10 November 2005 - 10:47

Hi Stefan,

Thanks a lot for your response.

What i have observed is at the initialstage of installation if i select cancel it will not invokes the custom action which i have set for rollback.

The actual purpose of implmenting rollback custom action is as described below:

I am installing SQL Express, .Netframwork in bootstrapper method. Bootstrapper will search for them on a machine if not exists it will install them.

After installing SQLExpress, .Netframework on demand bootstrapper will launch our MSI. While running this MSI if user select option for cancel then we should Uninstall the softwares those are installed by bootstrapper.

If user uninstalls after completion of the entire installation we have to uninstall the files those are installed by our MSI not the bootstrapper installed softwares.


Please suggest a better way to handle this

Thanks a lot
krishna

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 11 November 2005 - 09:49

Rollback is only available for custom actions that are scheduled between InstallInitialize and InstallFinalize.
Your bootstrapper would have to check the exit code from the msi part of your installation, and uninstall SQL Express if it indicates failure.