home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / programming / oracle7 7.2 / DB / DBINT72 / DBINT72.DEI next >
Encoding:
Text File  |  1995-10-12  |  5.4 KB  |  148 lines

  1. /* Copyright (c) Oracle Corporation 1994.  All Rights Reserved */
  2. /*****************************************************************************
  3.   NAME
  4.   dbint72.dei - V3 deinstallation script
  5.  
  6.   DESCRIPTION
  7.     This script deinstalls
  8.  
  9.   OWNER
  10.     Zakia Zerhouni
  11.  
  12.   MODIFIED    DD-MMM-YY  Reason
  13.   LMurphy     16-JUN-95  Modified for Windows 95
  14.   LMurphy     23-JAN-95  Modified for use with SQL*Net help
  15.   zzerhoun    04-JAN-95  Created.
  16. *****************************************************************************/
  17. {
  18.   { doit = execute("%installer_home%\win95.dei"); }
  19.   [
  20.     'UNBOUND_VARIABLE: signal('failure,instantiate(nls("instver_too_early2","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).")));
  21.   ]
  22.  
  23.  if (doit)
  24.  {
  25.       {
  26.     nav72 = v7_translate("NAV72");
  27.     {
  28.       if (not(exists(nav72)))
  29.         signal('UNBOUND_ENVIRONMENT_VARIABLE);
  30.     }
  31.       [ 'OS_ERROR: signal('UNBOUND_ENVIRONMENT_VARIABLE);
  32.         'INVALID_FILE_NAME: signal('UNBOUND_ENVIRONMENT_VARIABLE);
  33.         'PERMISSION_DENIED: signal('UNBOUND_ENVIRONMENT_VARIABLE); ]
  34.       }
  35.     [
  36.       'UNBOUND_ENVIRONMENT_VARIABLE:
  37.       {
  38.         variable = "NAV72";
  39.         information_dialog(instantiate(deinstall_prompt02),
  40.                    instantiate(deinstall_content02),
  41.                    instantiate(deinstall_help02));
  42.         doit = FALSE;
  43.       }
  44.     ]
  45.  }
  46.  
  47.  if (doit)
  48.   {
  49.     /**********************************************************************
  50.       Bind all NLS deinstall strings here...
  51.      ***********************************************************************/
  52.  
  53.     unregistering = nls("unregistering",
  54.                         "Unregistering %%registry_label%%...");
  55.     deinst_script = nls("deinst_script",
  56.                         "Removing %%registry_label%% Installation Scripts...");
  57.     deinst_doc = nls("deinst_doc","Deinstalling %%registry_label%% Help Files...");
  58.     deinst_dll = nls("deinst_dll","Deinstalling %%registry_label%% Dynamic Link Libraries...");
  59.     deinst_exe = nls("deinst_exe","Deinstalling %%registry_label%% Executables...");
  60.     resetting_variables = nls("resetting_variables",
  61.                               "Modifying Windows 95 Registry...");
  62.  
  63.     po7_deinst = instantiate(nls("po7_deinst", "%%registry_label%% (PO7.EXE) is currently running on this machine. Please close this application before deinstalling %%registry_label%%.
  64.  
  65. Choose OK after you have closed all Oracle applications and want to resume the deinstallation of %%registry_label%%.
  66.  
  67. Choose CANCEL to terminate the deinstallation of %%registry_label%%.
  68.     "));
  69.     po7_deinst_term = instantiate(nls("po7_deinst_term", "%%registry_label%% deinstallation terminated."));
  70.     po7_deinst_content = instantiate(nls("po7_deinst_content", "%%registry_label%% Running"));
  71.     po7_deinst_help = instantiate(nls("po7_deinst_help", "The Oracle Installer has detected that %%registry_label%% (PO7.EXE) is currently running on this machine.  Please close this application before deinstalling %%registry_label%%.
  72.  
  73. Choose OK after you have closed all Oracle applications and want to resume the deinstallation of %%registry_label%%.
  74.  
  75. Choose CANCEL to terminate the deinstallation of %%registry_label%%.
  76.     "));
  77.  
  78.     /* check to see if th epo7 app is closed */
  79.     done = FALSE;
  80.     while(not(done))
  81.     { move_file("%ORACLE_HOME%\bin\po7.exe", "%ORACLE_HOME%\bin\po7.exe"); done = TRUE;}
  82.     [ 'PERMISSION_DENIED, 'INVALID_FILE_NAME, 'OS_ERROR, 'WRITE_ERROR:
  83.       {
  84.         information_dialog(instantiate(po7_deinst), po7_deinst_content, instantiate(po7_deinst_help));
  85.         signal('FAILURE, instantiate(po7_deinst_term));
  86.       }
  87.       'FILE_NOT_FOUND:
  88.         done = TRUE;
  89.     ]
  90.  
  91.     win95_sys_dir = windows_system_directory();
  92.     win95_dir = windows_directory();
  93.  
  94.     /**********************************************************************
  95.          Continue with the deinstallation
  96.      ***********************************************************************/
  97.  
  98.       permit_retry_operations = TRUE;
  99.  
  100.       /********************
  101.       Deinstall the product
  102.       *********************/
  103.  
  104.       ui_action(instantiate(deinst_script));
  105.       remove(deinst);
  106.  
  107.       ui_action(instantiate(deinst_exe));
  108.       remove(exe);
  109.  
  110.       ui_action(instantiate(deinst_dll));
  111.       remove(dll);
  112.       remove(sample);
  113.  
  114.  
  115.       ui_action(instantiate(resetting_variables));
  116.       { win32_delete_key("HKEY_CURRENT_USER", "Software\ORACLE\Personal Oracle7 Navigator"); }
  117.       [ 'INVALID_KEY, 'FILE_NOT_FOUND, 'PERMISSION_DENIED, 'OS_ERROR: continue(); ]
  118.  
  119.       modify("NAV72","",ora_config,(registry_filename(current_registry)));
  120.  
  121.       { unreference(registration("w95po7"), current_registry); }
  122.       [ 'UNREGISTERED_PRODUCT: continue(); ]
  123.  
  124.       if (registered("w95po7"))
  125.       {
  126.         dependent = registration("w95po7");
  127.         unreference(dependent, current_registry);
  128.         deinstall(dependent);
  129.       }
  130.  
  131.       if (registered("w95rsf72"))
  132.       {
  133.         dependent = registration("w95rsf72");
  134.         unreference(dependent, current_registry);
  135.         deinstall(dependent);
  136.       }
  137.  
  138.       /*********************
  139.       Unregister the product
  140.       **********************/
  141.  
  142.       ui_action(instantiate(unregistering));
  143.       unregister(current_registry);
  144.  
  145.       permit_retry_operations = FALSE;
  146.     }
  147. }
  148.