home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / gc25ptch / gui25.dei < prev    next >
Text File  |  1995-01-30  |  5KB  |  127 lines

  1. /* Copyright (c) Oracle Corporation 1992.  All Rights Reserved */
  2. /*****************************************************************************
  3.   NAME
  4.     gui25.dei - V3 deinstallation script for GUI Common Files 2.5.
  5.  
  6.   DESCRIPTION
  7.     This script deinstalls GUI Common Files 2.5.
  8.  
  9.   OWNER
  10.     Rajesh Bansal
  11.  
  12.   MODIFIED   MM/DD/YY   Reason
  13.     bsabol   01-JUL-94  Modified for CDE2 release.
  14.    rbansal   13-MAY-94  Modified
  15.   dgalatin   23-DEC-93  Made 3.0.10.1 compliant.
  16.    akelley   22-OCT-93  Created.
  17. *****************************************************************************/
  18. {
  19.     { doit = execute("%installer_home%\windows.dei"); }
  20.     [
  21.         'UNBOUND_VARIABLE: signal('failure,instantiate(nls("instver_too_early2",
  22.                                                            "The version of the Installer currently running is %%installer_version%%. The product(s) you have chosen to deinstall were installed with a later version of the Installer. Please use a later version of the Installer to deinstall these Product(s).")));
  23.     ]
  24.     
  25.     installed_version = registry_version(current_registry);
  26.     
  27.     /***********************************************
  28.     Create a label with the product, version, and OS
  29.     ************************************************/
  30.     version_list    = explode(installed_version,".");
  31.     msb_version_list= list(first(version_list),
  32.                            first(rest(version_list)));
  33.     display_version = implode(msb_version_list,".");
  34.  
  35.     display_registry_label = "%registry_label% %display_version%";
  36.  
  37.     ui_product(instantiate(display_registry_label));
  38.     
  39.     if (doit)
  40.     {
  41.         /*************************************
  42.            Bind all NLS deinstall strings here...
  43.         **************************************/
  44.         deinstall_unregister = nls("deinstall_unregister", "Unregistering %%registry_label%%...");
  45.         deinstall_msb        = nls("deinstall_msb", "Removing %%registry_label%% Message Files...");
  46.         deinstall_res        = nls("deinstall_res", "Removing %%registry_label%% Resource Files...");
  47.         deinstall_help       = nls("deinstall_help", "Removing %%registry_label%% Help Files...");
  48.         deinstall_dll        = nls("deinstall_dll",  "Removing %%registry_label%% Dynamic Link Libraries...");
  49.         deinstall_exe        = nls("deinstall_exe", "Removing %%registry_label%% Executables...");
  50.         deinstall_dei        = nls("deinstall_dei", "Removing %%registry_label%% Installation Scripts...");
  51.         modify_variables     = nls("modify_variables", "Modifying %%registry_label%% Environment Variables...");
  52.  
  53.         /*******************************
  54.         Continue with the deinstallation
  55.         ********************************/
  56.         {
  57.             mm20 = v7_translate("mm20");
  58.             if (not(exists(mm20)))
  59.                 signal('UNBOUND_ENVIRONMENT_VARIABLE);
  60.         }
  61.         [
  62.             'OS_ERROR,'INVALID_FILE_NAME,
  63.                 'PERMISSION_DENIED,'UNBOUND_ENVIRONMENT_VARIABLE:
  64.             {
  65.                 variable = "mm20";
  66.                 information_dialog(instantiate(deinstall_prompt02),
  67.                                    instantiate(deinstall_content02),
  68.                                    instantiate(deinstall_help02));
  69.                 doit = FALSE;
  70.             }
  71.         ]
  72.     }
  73.  
  74.     if (doit)
  75.     {
  76.         if (registered("winrsf71"))
  77.         {
  78.             dependent = registration("winrsf71");
  79.             unreference(dependent,current_registry);
  80.             deinstall(dependent);
  81.         }
  82.  
  83.         permit_retry_operations = TRUE;    
  84.  
  85.         /*********************
  86.         Unregister the product
  87.         **********************/
  88.         ui_product(instantiate(display_registry_label));
  89.         ui_action(instantiate(deinstall_unregister));
  90.         unregister(current_registry);
  91.  
  92.         /********************
  93.         Deinstall the product
  94.         *********************/
  95.         ui_action(instantiate(deinstall_msb));
  96.         remove(msg);
  97.  
  98.         ui_action(instantiate(deinstall_res));
  99.         remove(res);
  100.  
  101.         ui_action(instantiate(deinstall_dll));
  102.         remove(dll);
  103.  
  104.         /*********************************************************** 
  105.         Remove fontchk.exe only if GUI Common 2.0.x is not installed
  106.         ************************************************************/
  107.         if (not(registered("wingui20")))                
  108.         {
  109.             ui_action(instantiate(deinstall_exe));
  110.             remove(exe);
  111.         }
  112.  
  113.         ui_action(instantiate(deinstall_dei));
  114.         remove(deinst);
  115.  
  116.         ui_action(instantiate(modify_variables));
  117.         {
  118.             modify("MM20", "", ora_config, "Oracle");
  119.             modify("TK21", "", ora_config, "Oracle");
  120.             modify("TK21_ICON", "", ora_config, "Oracle");                
  121.         }
  122.         ['UNBOUND_ENVIRONMENT_VARIABLE: continue();]
  123.  
  124.         permit_retry_operation = FALSE;
  125.     }
  126. }
  127.