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

Can't rollback my CA


7 replies to this topic

JoeThompson

JoeThompson
  • Members
  • 80 posts

Posted 06 March 2002 - 01:04

Hi,

I am using ISDev 7.02.
I have a deferred custom action that creates 3 empty directories.  During the life of the program, files are written to these directories.  
I have another custom action that removes all the files and the directories during uninstallation.  Both are written in IS Script (setup.rul) and work fine as is.
However, if the user selects "Cancel" during installation (after the directories have been created) I need to delete them.  So I wrote another CA that is a deferred rollback with the exact conditions of the CA that creates the dirs.  I put it directly in front of the "create" CA in the execute sequence.  The new CA calls the same script as the CA I use during uninstallation.
To test, I hit "Cancel" after I know that the directories are created.  The log file shows something about the rollback CA but I can't tell if it is getting called or not.  If it is, it isn't doing what it should as the directories still exist.  I have tried putting a MessageBox in the first line of the rollback CA but never see it.

How can I tell if it is being called?
Since it is in setup.rul, shouldn't it have access to Global properties?

Any suggestions would be appreciated.

Thank you,
Joe

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 06 March 2002 - 12:15

Do you have a condition on that rollback CA? It should have the same as the CA that creates the directories.
Is the CA that creates the directories of type deferred or immediate? It should be deferred.

JoeThompson

JoeThompson
  • Members
  • 80 posts

Posted 06 March 2002 - 20:48

Hi Stefan,

Yes, I have the same condition on both of them and the one that creates the directories is "deferred execution" while the one that removes them is "rollback execution".  

Thanks for any help.  By the way, what happened to email notifications of a thread?

Joe

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 06 March 2002 - 23:19

Quote (JoeThompson @ Mar. 06 2002,20:48)
By the way, what happened to email notifications of a thread?

They are now called "Track this topic"

JoeThompson

JoeThompson
  • Members
  • 80 posts

Posted 06 March 2002 - 23:22

OK, I see it.
Do you have any ideas about my rollback problem?

Thanks,
Joe

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 06 March 2002 - 23:25

Is this a Standard Project or a Basic MSI project?

JoeThompson

JoeThompson
  • Members
  • 80 posts

Posted 06 March 2002 - 23:26

It's Basic

JoeThompson

JoeThompson
  • Members
  • 80 posts

Posted 07 March 2002 - 20:10

Hi Stefan,

I have stumbled onto something that must be very important that I neglected to mention in my original post.  My setup is basically sequenced like this:

:
InstallInitialize
:
MoveFiles
InstallFiles
:
RBOne
CAOne
:
RBTwo
CATwo
:
:
InstallServices
<---------------- about here I hit "Cancel"
StartServices
:
InstallFinalize
:

The RBTwo was getting called.  RBOne did not (which was the one I was asking about).  I was looking at my rollback actions again and unchecked the "Ignore custom action return code" and changed the script that they call to return ERROR_SUCCESS.  Before, I had the "Ignore" checked and the script didn't return anything.  Now they both seem to get called!

This is the first time I've not ignored the return code.
Why would this cause the described behavior?
When is it important to look at return codes (in the sense I don't see what I can do with them)?

Thank you,
Joe