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

Script to abort uninstall


1 reply to this topic

pshore

pshore
  • Members
  • 12 posts

Posted 06 October 2004 - 01:32

The following ISScript script is intended to be run only during an uninstall. The intention is that if the RegisteredApplications.xml file exists it should abort the uninstall. What I get in reality, no matter where I place it in execution is the uninstall just aborts regardless of the existance of the file. If I the the REMOVE="ALL" condition out of the CA the install aborts. I have tried adding MessageBoxes to confirm that the script is running and get nothing. Also I get no compile errors with the script as is. HELP!!!!!! Thank you.



////////////////////////////////////////////////////////////////////////////////
//
// IIIIIII SSSSSS
// II SS InstallShield ®
// II SSSSSS © 1996-2002, InstallShield Software Corporation
// II SS All rights reserved.
// IIIIIII SSSSSS
//
//
// This template script provides the code necessary to build an entry-point
// function to be called in an InstallScript custom action.
//
//
// File Name: Setup.rul
//
// Description: InstallShield script - check for Registered Applications XML
// file, abort uninstall if found, continue with uninstall if
// the file is not found
//
////////////////////////////////////////////////////////////////////////////////

#include "ifx.h"

export prototype OECAppsGone( );


///////////////////////////////////////////////////////////////////////////////
//
// Function: OECAppsGone
//
// Purpose: Called by the CheckforUninstall Custom Action right after CostFinalize
// on remove only. Will check for existence of registered application XML
// file. If the file exists the updater should remain installed, thus the
// MSI will abort. If the file does not exist the Updater uninstall can
// proceed with the removal of the Updater.
//
///////////////////////////////////////////////////////////////////////////////
function OECAppsGone( )

begin
if (!Is(FILE_EXISTS, INSTALLDIR ^ "RegisteredApplications.xml")) then
abort;
endif;
end;

Edited by pshore, 06 October 2004 - 01:32.


ifthenelse

ifthenelse
  • Members
  • 10 posts

Posted 19 April 2005 - 09:19

use " exit;" instead of "abort;".