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

Abort during data move


4 replies to this topic

shorstma

shorstma
  • Members
  • 7 posts

Posted 22 July 2004 - 22:06

One of my requirements is to delete the installed files if a user presses Cancel during a ComponentMoveData. How can I do this? When Cancel is pressed in my InstallShield, the subset of the files remain.

I suspect I'm missing something in logging? Here is my code:

nResult = ComponentMoveData( MEDIA, nDisk, 0 );
svLogFile = UNINST_LOGFILE_NAME;
nStartResult = DeinstallStart(TARGETDIR, svLogFile, @UNINST_KEY, 0 );

Thanks very much, I appreciate anyone's help on this issue.

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 22 July 2004 - 23:53

Move to an MSI-based installation package that has true rollback support.
user posted image

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 23 July 2004 - 02:34

Yes, that is true: provided you don't make any system changes before InstallInitialize or after InstallFinalize in the execute sequence. The system change transaction runs between these actions.

Edited by Glytzhkof, 23 July 2004 - 02:34.

Regards
-Stein Åsmul

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 23 July 2004 - 09:02

If you stay with InstallScript: make sure you start the logging (DeinstallStart) before your start the file copy (ComponentMoveData)

shorstma

shorstma
  • Members
  • 7 posts

Posted 29 July 2004 - 21:36

Thanks for the replys. Altho I started my logging earlier as suggested, when I click on Cancel on the FILE COPY diaglog, the I.S. just ends without deleting the files that it has copied to the machine.

Is there a way to trap that Cancel right before the program bugs out? If I could, then I could write a command in the setup.rul to just delete the folder on the way out. How do I get control after that Cancel (and cancel confirm) is chosen?

Thanks.