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

Rolling back installation


4 replies to this topic

spacer21

spacer21
  • Members
  • 19 posts

Posted 10 August 2004 - 11:24

hi,

i've a custom action after InstallFinalize. when an error in a CA occur before InstallFinalize, installation is rolled back. but in a CA after InstallFinalize when an error occurs i return ERROR_INSTALL_FAILURE then it never rolls back the installation but it does show the Setup Interrupted dialog box.

is there any way to invoke the rollback? i come to the point after some research that before rolling back control is transferred to InstallInitialize. is it possible that i transfer control with Install Script.

regards

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 10 August 2004 - 12:27

I don't think this is possible. The whole point of InstallInitialize and InstallFinalize is that they signal the start and end of the installation actions that make changes to the target system, and it is this transaction that can be rolled back.

Why is the custom action inserted after InstallFinalize?
Regards
-Stein Åsmul

spacer21

spacer21
  • Members
  • 19 posts

Posted 11 August 2004 - 08:20

hi,

thnx for replying.

i did it because i want the CAs to run after CopyFiles, WriteIniValues, so on and so forth. and inserting them b/w InstallInitialize and InstallFinalize executes them before above actions.

but now i found the way. changing in-script execution to commit execution and inserting CAs b/w InstallInitialize and InstallFinalize worked perfectly. now they run after InstallFinalize and rollback installation on error. smile.gif

regards

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 11 August 2004 - 09:57

Yes, this is correct. Use deferred custom actions to operate on the files you install. They will then be run once the server process has copied files to the target system.
Regards
-Stein Åsmul

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 11 August 2004 - 16:28

You should use Deferred custom actions, not Commit.
Read this article for additional information:
http://www.installsi...00108/index.htm