home *** CD-ROM | disk | FTP | other *** search
/ Oracle Video Server 3.0.3.1 / OVS_3031_NT.iso / win32 / sqlnet / net23 / client / netc23.vrf < prev    next >
Encoding:
Text File  |  1997-10-23  |  17.8 KB  |  414 lines

  1. /* Copyright (c) Oracle Corporation 1994, 1996.  All Rights Reserved */
  2. /*****************************************************************************
  3.   NAME
  4.     netc23.vrf
  5.  
  6.   DESCRIPTION
  7.     This script checks dependencies and environment settings for installation
  8.     of the Windows 32 SQL*Net product.
  9.  
  10.   OWNER
  11.     Etna Flores
  12.  
  13.   MODIFIED    DD-MMM-YY  Reason
  14.  
  15.   otinoco   11/01/96 - Modified to fit standard formatting guidelines.
  16.   dstiefel  02/22/96 - Merge NT/95 for 2.3.2
  17.   ljiang    09/95    - Modified for Easy Configuration
  18.   dlau      08/07/95 - Modified for SQLNET 2.2
  19. *****************************************************************************/
  20. {
  21.  {
  22.    /* OS variables */
  23.  
  24.    if(platform() == "nt")
  25.       prefix = "nt";
  26.    else
  27.       prefix = "w95";
  28.  
  29.    instver_prod = evaluate("%prefix%instver");
  30.    install_prod = evaluate("%prefix%install");
  31.  
  32.    doit = execute("%installer_home%\%operating_system%.vrf");
  33.  }
  34.    [
  35.       'UNBOUND_VARIABLE:
  36.       {
  37.          required_version = product_version(instver_prod);
  38.          temp = explode(required_version,".");
  39.          required_version = implode(list(first(temp),first(rest(temp)),
  40.                                     first(rest(rest(temp))),
  41.                                     first(rest(rest(rest(temp))))),".");
  42.          signal('failure,instantiate(nls("instver_too_early1","The version of
  43. the Installer currently running is %%installer_version%%. The installation you
  44. have chosen requires version %%required_version%% or later. Please run version
  45. %%required_version%% or later in order to perform this installation.")));
  46.       }
  47.    ]
  48.  
  49.  if(doit)
  50.  {
  51.  
  52.  
  53.     /* execute the services.vrf for definitions of service errors */
  54.     if(platform() == "nt")
  55.       execute("%installer_home%\services.vrf");
  56.  
  57.     vrf_ratchet = "2.3.4.0.0";
  58.     {
  59.        oracle_group_name = oracle_group_name;
  60.     }
  61.     [
  62.        'UNBOUND_VARIABLE:
  63.        {
  64.           if(operating_system == "nt")
  65.           {
  66.              os_prefix = "NT";
  67.           }
  68.           else
  69.           {
  70.              os_prefix = "95";
  71.           }
  72.           oracle_group_name = nls("oracle_group_name","Oracle for Windows %os_prefix%");
  73.        }
  74.    ]
  75.  
  76. /*--------------------------------------------------------------------------------------------------*/
  77.  
  78.  
  79.    #############################################
  80.    #                                           #
  81.    # Defined Strings for use in netc23 scripts #
  82.    #                                           #
  83.    #############################################
  84.  
  85.  
  86.    /* Bind string constants, help strings, & prompt strings .. */
  87.  
  88.    net2_register = nls("net2_register","Registering %%product_label%%...");
  89.    net2_install_script = nls("net2_install_script","Installing %%product_label%% Installation Scripts...");
  90.    net2_install_message = nls("net2_install_message","Installing %%product_label%% Message Files...");
  91.    net2_install_sample = nls("net2_install_sample","Installing %%product_label%% Sample Files...");
  92.    net2_install_tns = nls("net2_install_tns","Installing %%product_label%% Executables...");
  93.    net2_install_easycfg = nls("net2_install_easycfg","Installing SQL*Net Easy Configuration Files...");
  94.  
  95.    app_prompt = nls("app_prompt","You must stop all Oracle Services and Applications using SQL*Net for the SQL*Net installation to be successful.%carriage_return%%carriage_return%Press OK to continue the installation once the services and applications have been stopped, or press Cancel to abort the installation.");
  96.    app_content = nls("app_content","Stop Oracle Applications");
  97.    app_help = nls("app_help","SQL*Net is being used.  Please stop Oracle applications and services before continuing to install.");
  98.  
  99.    netc23_inst_term = instantiate(nls("netc23_inst_term", "%%product_label%% installation terminated."));
  100.  
  101.    use_inst_from_media = nls("use_inst_from_media","SQL*Net Easy Configuration depends on the Oracle Installer. The Oracle Installer you are currently using is not compatible to run SQL*Net Easy Configuration. Please run the Oracle Installer from the release media in order to install the latest version of Oracle Installer and %product_label%.");
  102.    use_inst_from_media_label = nls("use_inst_from_media_label","Oracle Installer Not Compatible");
  103.    use_inst_from_media_help_term = nls("use_inst_from_media_help_term","SQL*Net Easy Configuration is installed together with %product_label%. SQL*Net Easy Configuration is dependent on the Oracle Installer. Your current Oracle Installer is not compatible with this version of SQL*Net Easy Configuration. Please run the Oracle Installer from the release media in order to install the latest version of Oracle Installer and %product_label%.%carriage_return%%carriage_return%OK or CANCEL terminates the installation of %product_label% .");
  104.    use_inst_from_media_help_cont = nls("use_inst_from_media_help_cont","SQL*Net Easy Configuration is installed together with %product_label%. SQL*Net Easy Configuration is dependent on the Oracle Installer. Your current Oracle Installer is not compatible with this version of SQL*Net Easy Configuration. Please run the Oracle Installer from the release media in order to install the latest version of Oracle Installer and %product_label%.%carriage_return%%carriage_return%OK continues with the installation of other products.%carriage_return%%carriage_return%CANCEL terminates the installation of %product_label%.");
  105.  
  106.    /* from Win 95 */
  107.  
  108.    new_stack_prompt = nls("new_stack_prompt","Select the network protocols for which you want Oracle SQL*Net support.  SQL*Net allows you to access remote databases on your network.  For each protocol you select, an Oracle SQL*Net Protocol Adapter will be installed.
  109.  
  110. If possible, the Installer detects the network protocols installed to your Windows 95 system and selects them for you.");
  111.  
  112.    new_stack_label = nls("new_stack_label","Oracle SQL*Net Adapter Selection");
  113.    new_stack_help = nls("new_stack_help","SQL*Net allows you to access remote databases on your network.  Select the network protocols for which you want Oracle SQL*Net support.  If possible, the Installer detects the network protocols installed to your Windows 95 system and selects them for you.
  114.  
  115. The TCP/IP network protocol enables data transfer on Local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
  116.  
  117. The SPX network protocol enables data transfer in a Novell Netware environment.
  118.  
  119. The Named Pipes network protocol enables data transfer in a Microsoft Network environment or LAN Manager environment.
  120.  
  121. If you are not familiar with network transport protocols, please contact your network administrator.");
  122.  
  123.    installation_terminated = nls("installation_terminated","Installation terminated.  Please stop all Oracle applications that are using %%product_label%%.");
  124.    reinstall_prompt = nls("reinstall_prompt","Oracle SQL*Net is currently installed to your machine. Would you like to:");
  125.    reinstall_label = nls("reinstall_label","Oracle SQL*Net Network Support");
  126.    reinstall_help = nls("reinstall_help","The Installer has examined your machine and found that SQL*Net is already installed.
  127.  
  128. To configure access to additional remote databases (add a Database Alias) please select the first checkbox.
  129.  
  130. To reinstall SQL*Net or add support for additional network protocols (add a SQL*Net Protocol Adapter) please select the second checkbox.
  131.  
  132. Press OK to continue or CANCEL to terminate this installation. ");
  133.  
  134.    netc22_expl = nls("netc22_expl", "A %%product_label%% DLL (NTNT.DLL) is being used on this machine. Please stop all Oracle applications that are using %%product_label%% before installing %%product_label%%.
  135.  
  136. Silent mode installation of %%product_label%% terminated.");
  137.  
  138.    netc22_inst = instantiate(nls("netc22_inst", "A %%product_label%% DLL (NTNT.DLL) is being used on this machine. Please stop all Oracle applications that are using %%product_label%% before installing %%product_label%%.
  139.  
  140. Choose OK after you have closed all Oracle applications and want to resume the installation of %%product_label%%.
  141.  
  142. Choose CANCEL to terminate the installation of %%product_label%%."));
  143.  
  144.    netc22_inst_term = instantiate(nls("netc22_inst_term", "%%product_label%% installation terminated."));
  145.    netc22_inst_content = instantiate(nls("netc22_inst_content", "%%product_label%% DLL Used"));
  146.    netc22_inst_help = instantiate(nls("netc22_inst_help", "The Oracle Installer has detected that a %%product_label%% DLL (NTNT.DLL) is being used on this machine.  Please stop all Oracle applications that are using %%product_label%% before installing %%product_label%%.
  147.  
  148. Choose OK after you have closed all Oracle applications and want to resume the installation of %%product_label%%.
  149.  
  150. Choose CANCEL to terminate the installation of %%product_label%%."));
  151.  
  152.    none_selected = nls("none_selected","No Oracle SQL*Net Protocol Adapter was selected for installation.");
  153.    none_selected_label = nls("none_selected_label","None Selected");
  154.    none_selected_help_term = nls("none_selected_help_term","No Oracle SQL*Net Protocol Adapter was selected for installation.
  155.  
  156. You need to select at least one network protocol in order to install %product_label%.
  157.  
  158. BACK returns to %new_stack_label% dialog box to make a selection.
  159.  
  160. OK or CANCEL terminates the installation of %product_label% .");
  161.  
  162.    none_selected_help_cont = nls("none_selected_help_cont","No Oracle SQL*Net Protocol Adapter was selected for installation.
  163.  
  164. You need to select at least one network protocol in order to install %product_label%.
  165.  
  166. BACK returns to %new_stack_label% dialog box to make a selection.
  167.  
  168. OK continues with the installation of other products.
  169.  
  170. CANCEL terminates the installation of %product_label%.");
  171.  
  172.  
  173.    no_protocol = nls("no_protocol","The Oracle Installer did not detect TCP/IP, SPX or Named Pipes protocols on your machine.
  174.  
  175. Before installing SQL*Net, you must install either TCP/IP, SPX or Named Pipes.");
  176.  
  177.    no_protocol_label =  nls("no_protocol_label","No Protocol Detected");
  178.    no_protocol_help = nls("no_protocol_help","The Oracle Installer did not detect TCP/IP, SPX or Named Pipes protocols on your machine.
  179.  
  180. Before installing SQL*Net, you must install either TCP/IP, SPX or Named Pipes.
  181.  
  182. The TCP/IP network protocol enables data transfer on Local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
  183.  
  184. The SPX network protocol enables data transfer in a Novell Netware environment.
  185.  
  186. The Named Pipes network protocol enables data transfer in a Microsoft Network environment or LAN Manager environment.
  187.  
  188. If you are not familiar with network transport protocols, please contact your network administrator.");
  189.  
  190.  
  191. /*--------------------------------------------------------------------------------------------------*/
  192.  
  193.  
  194.  
  195. /*--------------------------------------------------------------------------------------------------*/
  196.  
  197.    ############################
  198.    #                          #
  199.    # Stop All Oracle Services #
  200.    #                          #
  201.    ############################
  202.  
  203.  
  204.    /* set global flags for starting and stopping services */
  205.  
  206.    { start_listener = start_listener; }
  207.    [ 'UNBOUND_VARIABLE: set('start_listener, "Do not Start Listener", 'GLOBAL); ]
  208.  
  209.    { start_db_service = start_db_service; }
  210.    ['UNBOUND_VARIABLE: set('start_db_service, "Do Not Start Service", 'GLOBAL); ]
  211.  
  212.  
  213.  
  214.    if (platform() == "nt")
  215.    {
  216.  
  217.       /* First query to see if services are already started */
  218.       /* If they are, they will be restarted in user.pin */
  219.       /* Comment this out for now:  Bug in installer prevents from working in Windows 95
  220.       listenerStatus  = winnt_query_service_status("OracleTNSListener");
  221.       startDBStatus   = winnt_query_service_status("OracleStartOrcl");
  222.       serviceDBStatus = winnt_query_service_status("OracleServiceOrcl");
  223.  
  224.       if((listenerStatus == SERVICE_START_PENDING) || (listenerStatus == SERVICE_CONTINUE_PENDING) ||
  225.          (listenerStatus == SERVICE_RUNNING))
  226.       {
  227.          set('start_listener, "Start Listener", 'GLOBAL);
  228.       }
  229.       if((startDBStatus == SERVICE_START_PENDING) || (startDBStatus == SERVICE_CONTINUE_PENDING) ||
  230.          (startDBStatus == SERVICE_RUNNING))
  231.       {
  232.          set('start_db_service, "Start Service", 'GLOBAL);
  233.       }
  234.       if((serviceDBStatus == SERVICE_START_PENDING) || (serviceDBStatus == SERVICE_CONTINUE_PENDING) ||
  235.          (serviceDBStatus == SERVICE_RUNNING))
  236.       {
  237.          set('start_db_service, "Start Service", 'GLOBAL);
  238.       }
  239.       */
  240.  
  241.  
  242.       /* Now stop all known Oracle Services */
  243.       { nt_stop_service("OracleTNSListener"); }
  244.       [ 'DEFAULT: continue(); ]
  245.  
  246.       { nt_stop_service("oraclenmplistenerorcl"); }
  247.       [ 'DEFAULT: continue(); ]
  248.  
  249.       { nt_stop_service("oracletcplistener"); }
  250.       [ 'DEFAULT: continue(); ]
  251.  
  252.       { nt_stop_service("oraclestartorcl"); }
  253.       [ 'DEFAULT: continue(); ]
  254.  
  255.       { nt_stop_service("oracleserviceorcl"); }
  256.       [ 'DEFAULT: continue(); ]
  257.  
  258.       { nt_stop_service("oracleservice");  }
  259.       [ 'DEFAULT: continue(); ]
  260.  
  261.       { nt_stop_service("oraclenmplistener"); }
  262.       [ 'DEFAULT: continue(); ]
  263.  
  264.  
  265.    }
  266.  
  267.  
  268.  
  269. /*--------------------------------------------------------------------------------------------------*/
  270.  
  271.    #########################################################
  272.    #                                                       #
  273.    # Autodetection and Verification Sequence for NT and 95 #
  274.    #                                                       #
  275.    #########################################################
  276.  
  277.  
  278.  
  279.  
  280.    /* Variables and Logic */
  281.  
  282.    netclt_prod = w32netclt23;
  283.    tcp_prod = w32tcp23;
  284.    spx_prod = w32spx23;
  285.    nmp_prod = w32nmp23;
  286.  
  287.    if(platform() == "nt")
  288.    {
  289.       appc_prod = w32appc23;
  290.       dnt_prod = w32dnt23;
  291.    }
  292.    tcp_name = product_name(tcp_prod);
  293.    spx_name = product_name(spx_prod);
  294.    nmp_name = product_name(nmp_prod);
  295.    adp_pkg = adp23;                       /* use the pkg */
  296.    install_adp = FALSE;                   /* force protocol adapter install */
  297.    install_tcp = FALSE;                   /* Autodetect for this protocol */
  298.    install_spx = FALSE;                   /* Autodetect for this protocol */
  299.    install_nmp = TRUE;                    /* Always install the Named Pipes Protocol Adapter for this release */
  300.    total = 0;                             /* return size from this script */
  301.  
  302.  
  303.  
  304.    /* Force install RSF and Trace Collection Services */
  305.    total = total + verify(w32rsf73) + verify(w32traceSvr);
  306.  
  307.    /* Force install Named Pipes Protocol Adapter in Windows NT */
  308.    total = total + verify(nmp_prod);
  309.  
  310.  
  311.    /* Now begin Autodetection Sequence for SPX and TCP/IP only.  DECNet and LU6.2 are only installed through custom.*/
  312.    if(platform() == "nt")
  313.    {
  314.  
  315.       /* TCP/IP */
  316.       if(win32_key_exists("HKEY_LOCAL_MACHINE", "System\CurrentControlSet\Services\TCPIP"))
  317.       {
  318.          install_tcp = TRUE;
  319.          total = total + verify(tcp_prod);
  320.       }
  321.  
  322.       /* Novell NDS Client */
  323.       if(win32_key_exists("HKEY_LOCAL_MACHINE", "System\CurrentControlSet\Services\NwlnkIpx") ||
  324.          win32_key_exists("HKEY_LOCAL_MACHINE", "Software\Novell\IpxSpx"))
  325.       {
  326.          install_spx = TRUE;
  327.          total = total + verify(spx_prod);
  328.       }
  329.  
  330.    }
  331.    else /* Win 95 */
  332.    {
  333.  
  334.       /* This loop performs protocol auto-detection in Windows 95 */
  335.       increment = 0;
  336.       while(increment < 100)
  337.       {
  338.           if(increment > 9)
  339.             increment_string = "%increment%";
  340.          else
  341.             increment_string = "0%increment%";
  342.  
  343.          temp_string = win32_get_value("HKEY_LOCAL_MACHINE",
  344.                                        "System\CurrentControlSet\Services\Class\NetTrans\00%increment_string%",
  345.                                        "DeviceVxDs");
  346.          temp_list = explode(temp_string,",", 'STRINGSONLY);
  347.  
  348.          if(member(temp_list, "vtcp.386"))
  349.             install_tcp = TRUE;
  350.          else if (member(temp_list, "nwlink.vxd") || member(temp_list, "nios.vxd"))
  351.             install_spx = TRUE;
  352.          increment = increment + 1;
  353.       }
  354.       [ 'INVALID_KEY, 'FILE_NOT_FOUND, 'OS_ERROR: increment = increment + 1; ]
  355.  
  356.       /* Novell's Stack */
  357.       {
  358.        if(not(install_spx) && (win32_key_exists("HKEY_LOCAL_MACHINE", "Network\Novell\ProtocolIPX")))
  359.          install_spx = TRUE;
  360.       }
  361.       [ 'DEFAULT:   continue(); ]
  362.  
  363.       if(install_tcp)
  364.          total = total + verify(tcp_prod);
  365.       if(install_spx)
  366.          total = total + verify(spx_prod);
  367.    }
  368.  
  369.  
  370. /*--------------------------------------------------------------------------------------------------*/
  371.  
  372.    ########################################
  373.    #                                      #
  374.    # Verify the Installer for Easy Config #
  375.    #                                      #
  376.    ########################################
  377.  
  378.    if(not(registered("%prefix%install")))      /* installer running from media */
  379.       total = total + verify(install_prod);
  380.    else
  381.       if(earlier_version(registration("%prefix%install"),product_version(instver_prod)))
  382.        {
  383.          total = total + verify(install_prod);
  384.        }
  385.        [
  386.          'FAILURE:
  387.          {
  388.             if(member(selected_products, netclt_prod) && empty(rest(selected_products)))
  389.             {
  390.                information_dialog(use_inst_from_media,use_inst_from_media_label,use_inst_from_media_help_term);
  391.                signal('CANCEL, netc23_inst_term);
  392.             }
  393.             else
  394.             {
  395.                information_dialog(use_inst_from_media,use_inst_from_media_label,use_inst_from_media_help_cont);
  396.                doit = FALSE;
  397.                return (0);
  398.             }
  399.          }
  400.       ]
  401.  
  402. /*--------------------------------------------------------------------------------------------------*/
  403.  
  404.  
  405.    /* return total size */
  406.    return(total + sum(tns,bequeth,prefix,sample,msb,nls_abbreviation,deinstl,cfg23));
  407.    }
  408.  else
  409.    {
  410.     refresh_map_file = FALSE;
  411.     return(0);
  412.    }
  413. }
  414.