home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / programming / oracle7 7.2 / DB / RDBMS72 / RDBMS72.DEI < prev    next >
Encoding:
Text File  |  1995-10-17  |  12.9 KB  |  320 lines

  1. /* Copyright (c) Oracle Corporation 1992.  All Rights Reserved */
  2. /*****************************************************************************
  3.   NAME
  4.     rdbms72.dei - Windows V3 deinstallation script for Personal Oracle7
  5.           DBMS.
  6.  
  7.   DESCRIPTION
  8.     This script removes the Personal Oracle7 DBMS files
  9.     and un-registers the product.
  10.  
  11.   OWNER
  12.     Tony Rodgers
  13.  
  14.   MODIFIED    DD-MMM-YY Reason
  15.    LMurphy     06/13/95 - Modified for 7.2/Windows 95
  16.    LMurphy     11/29/94 - modified NT RDBMS script for Personal Oracle7
  17.    syau        07/01/94 - 7.1.3
  18.     HA!        04/28/94 - 7.1.2 and 3.0.10.2
  19.    Hartenstine 04/20/93 - WIN_NT: Adapt for Windows NT
  20.     Colello    10/09/92 - DESKTOP: remove doc and demo files as well
  21.     trodgers  01-APR-92 Created.
  22. *****************************************************************************/
  23. {
  24.   { doit = execute("%installer_home%\win95.dei"); }
  25.   [
  26.     '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).")));
  27.   ]
  28.  
  29.   if (doit)
  30.     {
  31.       /**********************************************************************
  32.      Ensure that the necessary environment variables are bound
  33.        **********************************************************************/
  34.  
  35.       {
  36.     rdbms72 = v7_translate("RDBMS72");
  37.     {
  38.       if (not(exists(rdbms72)))
  39.         signal('UNBOUND_ENVIRONMENT_VARIABLE);
  40.     }
  41.       [ 'OS_ERROR: signal('UNBOUND_ENVIRONMENT_VARIABLE);
  42.         'INVALID_FILE_NAME: signal('UNBOUND_ENVIRONMENT_VARIABLE);
  43.         'PERMISSION_DENIED: signal('UNBOUND_ENVIRONMENT_VARIABLE); ]
  44.       }
  45.     [
  46.       'UNBOUND_ENVIRONMENT_VARIABLE:
  47.       {
  48.         variable = "RDBMS72";
  49.         information_dialog(instantiate(deinstall_prompt02),
  50.                    instantiate(deinstall_content02),
  51.                    instantiate(deinstall_help02));
  52.         doit = FALSE;
  53.       }
  54.     ]
  55.  
  56.       {
  57.     rdbms_files = v7_translate("RDBMS_FILES");
  58.     {
  59.       if (not(exists(rdbms_files)))
  60.         signal('UNBOUND_ENVIRONMENT_VARIABLE);
  61.     }
  62.       [ 'OS_ERROR: signal('UNBOUND_ENVIRONMENT_VARIABLE);
  63.         'INVALID_FILE_NAME: signal('UNBOUND_ENVIRONMENT_VARIABLE);
  64.         'PERMISSION_DENIED: signal('UNBOUND_ENVIRONMENT_VARIABLE); ]
  65.       }
  66.     [
  67.       'UNBOUND_ENVIRONMENT_VARIABLE:
  68.       {
  69.         variable = "RDBMS_FILES";
  70.         information_dialog(instantiate(deinstall_prompt02),
  71.                    instantiate(deinstall_content02),
  72.                    instantiate(deinstall_help02));
  73.         doit = FALSE;
  74.       }
  75.     ]
  76.  
  77.       {
  78.         mshelp = v7_translate("MSHELP");
  79.         {
  80.           if (not(exists(mshelp)))
  81.             signal('UNBOUND_ENVIRONMENT_VARIABLE);
  82.         }
  83.           [ 'OS_ERROR: signal('UNBOUND_ENVIRONMENT_VARIABLE);
  84.             'INVALID_FILE_NAME: signal('UNBOUND_ENVIRONMENT_VARIABLE);
  85.             'PERMISSION_DENIED: signal('UNBOUND_ENVIRONMENT_VARIABLE); ]
  86.       }
  87.         [
  88.           'UNBOUND_ENVIRONMENT_VARIABLE:
  89.           {
  90.             variable = "MSHELP";
  91.             information_dialog(instantiate(deinstall_prompt02),
  92.                                instantiate(deinstall_content02),
  93.                                instantiate(deinstall_help02));
  94.             doit = FALSE;
  95.           }
  96.         ]
  97.  
  98.     }
  99.  
  100.  
  101.    if (doit)
  102.    {
  103.  
  104.     { bundle_name = bundle_name; }
  105.         [ 'UNBOUND_VARIABLE: bundle_name = nls("bundle_name","Personal Oracle7 for Windows 95"); ]
  106.  
  107.       /**********************************************************************
  108.      Bind all NLS deinstall strings here...
  109.        **********************************************************************/
  110.  
  111.       start_database_name = nls("start_database_name","Start Database");
  112.       stop_database_name = nls("stop_database_name","Stop Database");
  113.       recovery_name = nls("recovery_name","The Recovery Manager");
  114.       backup_name = nls("backup_name","The Backup Manager");
  115.       readme_name = nls("readme_name","Readme");
  116.  
  117.       oracle7_run = instantiate(nls("oracle7_run", "The Oracle7 kernel (ORACLE72.EXE) is currently running on this machine.  Before deinstalling this software, please shut down the database and stop the kernel by running Stop Database.
  118.  
  119. Choose OK after you have closed all Oracle applications and want to resume the deinstallation of %%registry_label%%.
  120.  
  121. Choose CANCEL to terminate the deinstallation of %%registry_label%%.
  122.       "));
  123.       rdbms_deinst_term = instantiate(nls("rdbms_deinst_term", "Oracle7 DBMS deinstallation terminated."));
  124.       oracle7_run_content = instantiate(nls("oracle7_run_content", "Oracle7 kernel"));
  125.       oracle7_run_help = instantiate(nls("oracle7_run_help", "The Oracle Installer has detected that Oracle7 kernel (ORACLE72.EXE) is currently running on this machine.  Please shut down the database and stop Oracle7 before deinstalling this software.
  126.  
  127. To shut down the database, run Stop Database.
  128.  
  129. Choose OK after you have closed all Oracle applications and want to resume the deinstallation of %%registry_label%%.
  130.  
  131. Choose CANCEL to terminate the deinstallation of %%registry_label%%.
  132.  
  133. "));
  134.  
  135.       po7dll_run = instantiate(nls("po7dll_run", "The Two-Task Driver DLL (SQLNTTT.DLL) is currently running on this machine.  Before deinstalling this software, please close all Oracle applications.
  136.  
  137. Choose OK after you have closed all Oracle applications and want to resume the deinstallation of %%registry_label%%.
  138.  
  139. Choose CANCEL to terminate the deinstallation of %%registry_label%%.
  140.       "));
  141.       po7dll_run_content = instantiate(nls("po7dll_run_content", "2-Task Driver DLL running"));
  142.       po7dll_run_help = instantiate(nls("po7dll_run_help", "The Oracle Installer has detected that a 2-Task Driver DLL (SQLNTTT.DLL) is currently running on this machine.  Please close all Oracle applications before deinstalling this software.
  143.  
  144. Choose OK after you have closed all Oracle applications and want to resume the deinstallation of %%registry_label%%.
  145.  
  146. Choose CANCEL to terminate the deinstallation of %%registry_label%%.
  147.       "));
  148.  
  149.       remove_prompt = instantiate(nls("remove_prompt","Do you want to remove the database in %%RDBMS_FILES%%?"));
  150.       remove_content = nls("remove_content","Remove Database");
  151.       remove_help = instantiate(nls("remove_help","If you want to remove the database in the %%ORACLE_HOME%%\DBS directory, choose 'YES'.  If you want to retain this database, choose 'NO' and the database files will not be removed."));
  152.  
  153.       unregistering = nls("unregistering","Unregistering %%registry_label%%...");
  154.       remove_database = nls("remove_database","Removing Database Files...");
  155.       remove_service = nls("remove_service","Removing Database Service...");
  156.       deinst_doc = nls("deinst_doc","Deinstalling %%registry_label%% Help Files...");
  157.       deinst_dll = nls("deinst_dll","Deinstalling %%registry_label%% Dynamic Link Libraries...");
  158.       deinst_exe = nls("deinst_exe","Deinstalling %%registry_label%% Executables...");
  159.       deinst_admin = nls("deinst_admin","Deinstalling %%registry_label%% Administration Files...");
  160.       deinst_oci = nls("deinst_oci","Deinstalling %%registry_label%% OCI Files...");
  161.       deinst_msg = nls("deinst_msg","Deinstalling %%registry_label%% Message Files...");
  162.       deinst_script = nls("deinst_script","Deinstalling %%registry_label%% Installation Scripts...");
  163.       modifying_config = nls("modifying_config",
  164.                    "Modifying Environment Variables...");
  165.  
  166.       expand_db_prompt = nls("expand_db_prompt", "Deinstallation does not remove database files created after the installation of the Starter Database or those created due to a custom 'create database' command.  You can manually remove these files after deinstallation is complete.");
  167.       expand_db_content = nls("expand_db_content", "Database files");
  168.       expand_db_help = nls("expand_db_help", "If you expanded the Starter Database after installation or created your own custom database, the deinstall process may not remove all of the database, log, or control files in your database.  You can manually remove them after deinstallation is complete.");
  169.  
  170.       yes_prompt = nls("yes_prompt", "Yes");
  171.       no_prompt = nls("no_prompt", "No");
  172.       ynprompt = list(yes_prompt, no_prompt);
  173.  
  174.       /**********************************************************************
  175.      Continue with the deinstallation
  176.        **********************************************************************/
  177.  
  178.       permit_retry_operations = FALSE;
  179.  
  180. /* LMurphy - see if oracle is running */
  181. /* if so, exit installer */
  182.  
  183.         done = FALSE;
  184.         while(not(done))
  185.         { move_file("%ORACLE_HOME%\bin\oracle72.exe", "%ORACLE_HOME%\bin\oracle72.exe"); done = TRUE;}
  186.     [ 'PERMISSION_DENIED, 'INVALID_FILE_NAME, 'OS_ERROR, 'WRITE_ERROR:
  187.     {
  188.         information_dialog(oracle7_run, oracle7_run_content, oracle7_run_help);
  189.     }
  190.       'FILE_NOT_FOUND:
  191.                 done = TRUE;
  192.     ]
  193.  
  194.         done = FALSE;
  195.         while(not(done))
  196.         { move_file("%ORACLE_HOME%\bin\sqlnttt.dll", "%ORACLE_HOME%\bin\sqlnttt.dll"); done = TRUE;}
  197.     [ 'PERMISSION_DENIED, 'INVALID_FILE_NAME, 'OS_ERROR, 'WRITE_ERROR:
  198.     {
  199.                 information_dialog(po7dll_run, po7dll_run_content, po7dll_run_help);
  200.     }
  201.       'FILE_NOT_FOUND:
  202.                 done = TRUE;
  203.     ]
  204.       remove_db = FALSE;
  205.       if (exists("%RDBMS_FILES%\ctl1orcl.ora"))
  206. /*        remove_db = yesno_dialog(remove_prompt,TRUE, remove_content,remove_help);*/
  207.       {
  208.           ans = single_selection_dialog(remove_prompt,ynprompt, yes_prompt, remove_content,remove_help);
  209.           if (ans == yes_prompt)
  210.             remove_db = TRUE;
  211.       }
  212.  
  213.       ui_product(registry_label);
  214.  
  215.       if (remove_db)
  216.       {
  217.     information_dialog(expand_db_prompt, expand_db_content, expand_db_help);
  218.     ui_action(instantiate(remove_database));
  219.  
  220.     remove_file("%RDBMS72%\TRACE\orclpmon.trc");
  221.     remove_file("%RDBMS72%\TRACE\orclreco.trc");
  222.     remove_file("%RDBMS72%\TRACE\orclsmon.trc");
  223.     remove_file("%RDBMS72%\TRACE\orcllgwr.trc");
  224.     remove_file("%RDBMS72%\TRACE\orcldbwr.trc");
  225.     remove_file("%RDBMS72%\TRACE\orclalrt.log");
  226.     remove_file("%RDBMS72%\TRACE\orclsnp0.trc");
  227.     remove_file("%RDBMS72%\TRACE\knlstop.log");
  228.     remove_file("%RDBMS72%\TRACE\build.log");
  229.     remove_file("%RDBMS_FILES%\ctl1orcl.ora");
  230.     remove_file("%RDBMS_FILES%\log1orcl.ora");
  231.     remove_file("%RDBMS_FILES%\log2orcl.ora");
  232.     remove_file("%ORACLE_HOME%\DATABASE\pwdorcl.ora");
  233.  
  234.     remove(init);
  235.     remove_file("%oracle_home%\bin\vs10.ini");
  236.     remove(seed);
  237.     rdbms_loc = explode(rdbms_files, "\", TRUE);
  238.     rdbms_home_list = list(first(rdbms_loc), first(rest(rdbms_loc)), first(rest(rest(rdbms_loc))));
  239.     rdbms_home = implode(rdbms_home_list);
  240.     { remove_directory("%rdbms_home%"); }
  241.     [ 'INVALID_FILE_NAME, PERMISSION_ERROR, WRITE_ERROR, OS_ERROR:
  242.         continue();
  243.     ]
  244.       }
  245.  
  246.       ui_action(instantiate(deinst_exe));
  247.       remove(exec);
  248.       remove(doc);
  249.       remove(help);
  250.       remove(sql);
  251.  
  252.     /* *.GID is created when *.HLP is executed */
  253.     /* They are removed below */
  254.     {
  255.         remove_file("%MSHELP%\XE11T.GID");
  256.     }
  257.     [ 'INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'OS_ERROR:
  258.         continue();
  259.     ]
  260.         
  261.       ui_action(instantiate(deinst_dll));
  262.       remove(twotask);
  263.       remove(dll);
  264.       remove(res);
  265.  
  266.       ui_action(instantiate(deinst_msg));
  267.       remove(msg);
  268.  
  269.       ui_action(instantiate(deinst_script));
  270.       remove(deinstl);
  271.  
  272.       { unreference(registration("w95po7"), current_registry); }
  273.       [ 'UNREGISTERED_PRODUCT: continue(); ]
  274.  
  275.       if (registered("w95po7"))
  276.       {
  277.         dependent = registration("w95po7");
  278.         unreference(dependent, current_registry);
  279.         deinstall(dependent);
  280.       }
  281.  
  282.       if (registered("w95util72"))
  283.       {
  284.     dependent = registration("w95util72");
  285.     unreference(dependent,current_registry);
  286.     deinstall(dependent);
  287.       }
  288.  
  289.       if (registered("w95rsf72"))
  290.       {
  291.     dependent = registration("w95rsf72");
  292.     unreference(dependent,current_registry);
  293.     deinstall(dependent);
  294.       }
  295.  
  296.       ui_action(instantiate(unregistering));
  297.       unregister(current_registry);
  298.  
  299.       ui_action(instantiate(modifying_config));
  300.  
  301.       modify("DBA_AUTHORIZATION","",ora_config,(registry_filename(current_registry)));
  302.       modify("ORACLE_SID","",ora_config,(registry_filename(current_registry)));
  303.       modify("DATABASE_STARTUP","",ora_config,(registry_filename(current_registry)));
  304.       modify("RDBMS_FILES","",ora_config,(registry_filename(current_registry)));
  305.  
  306. /* Backup and Recovery items */
  307.  
  308.       if (not(registered("w95hlpdoc72")))
  309.     modify("MSHELP","",ora_config,registry_filename(current_registry));
  310.       modify("MSHELP_TOOLS","",ora_config,registry_filename(current_registry));
  311.  
  312.       modify("RDBMS72_CONTROL","",ora_config,registry_filename(current_registry));
  313.       modify("RDBMS72_ARCHIVE","",ora_config,registry_filename(current_registry));
  314.       modify("VS10","",ora_config,registry_filename(current_registry));
  315.  
  316.  
  317.       permit_retry_operations = FALSE;
  318.     }
  319. }
  320.