/* Copyright (c) Oracle Corporation 1996.  All Rights Reserved */

/*****************************************************************************
  NAME
    intsol60.dei - Deinstallation script for Intersolv DataDirect Drivers

  DESCRIPTION
    This script removes the Intersolv Datadirect Drivers package.

    Main Logic:
    Section I:     De-installation from the parent product
    Section II:  De-installation from a selected child product; remove parent if no other children are installed

  MODIFIED    MM/DD/YY    Reason
   pgupta     09/29/97    Created
*****************************************************************************/

{

    /*****************************************
    Set necessary variables for deinstallation
    ******************************************/
    EXECUTE_SCRIPT = "SET_DEINSTALL_VARIABLES";
    execute("%installer_home%\d2kr2dei.usr");
    /*****************************************/

    doit = TRUE;    /*not making normal call to <os>.dei because referencing does not matter here - don't want dialog to show*/
        registry_label = registry_interface_label(current_registry);

    if (doit)
    {

        /************************************************
        Create a label with the product name, and version
        *************************************************/
        EXECUTE_SCRIPT = "CREATE_LABEL";
        execute("%installer_home%%dir_separator%d2kr2dei.usr");
        /************************************************/

        /******************
         Bind OCA60 variable
        *******************/
        OCA60 = "%oracle_home%%dir_separator%OCA60";
        windows_sys_dir = windows_system_directory();

        permit_retry_operations  = TRUE;
        permit_ignore_operations = TRUE;
        permit_process_operations= TRUE;

        /****************************
        Set up product name variables
        *****************************/
        dependency_list = list("w32ssf60");
        /****************************/


        /**************************************************************
        Unreference & Deinstall Component Products if explicitly called
        ***************************************************************/
        EXECUTE_SCRIPT = "DEINSTALL_COMPONENTS";
        execute("%installer_home%%dir_separator%d2kr2dei.usr");
        /**********************************************************/

        /***********************************
        Unreference & Deinstall Dependencies
        ************************************/
        EXECUTE_SCRIPT = "UNREFERENCE_DEPENDENCIES";
        execute("%installer_home%%dir_separator%d2kr2dei.usr");
        /***********************************/
        /*********************
        Unregister the product
        **********************/
        ui_product(instantiate(display_registry_label));
        ui_action(instantiate(deinstall_unregister));
        unregister(current_registry);
        /*********************/
        /*********************************
         Remove parent and all child files
         **********************************/
         ui_action(instantiate(deinstall_files));
         remove(intsol2, "doc");
         remove(intsol2, "lic");
         remove(intsol2, "d2dll");
               /* do not remove ODBC files ever - don't remove ODBC or ODBCADM*/
         remove(intsol1, "exe");
         remove(shrdll,"intsol");
         remove(deinst);


        permit_retry_operations = FALSE;

    }   /*end if doit */

} /*end intsol60.dei */
