/* Copyright (c) Oracle Corporation 1992. All Rights Reserved */ /***************************************************************************** NAME netc80.vrf - Windows NT V8 installation verification script for the Net 8.0.3 Client Installable patch DESCRIPTION This script installs patch files for the Net 8 client product OWNER Alyn Kelley MODIFIED DD-MMM-YY Reason veyunni 12/02/02 - Made the changes needed for XP installation ewang 07/14/97 - updated for NET 8.0.3 client jyu 10/23/96 - Updated for SQL*Net 2.3 client akelley 02/24/95 - Created as template script. akelley 01/16/95 - Updated for Shared Oracle compliance. *****************************************************************************/ { SHARED_ORACLE_COMPLIANT = TRUE; /*********************************************************************** Set the VRF-INS script "ratchet" ***********************************************************************/ vrf_ratchet = "8.0.6.3.2"; /*************************************************************************** Execute the nt.vrf script for standard version analysis and because it is required for Shared Oracle. ***************************************************************************/ { if (platform() == "nt") prefix = "nt"; else prefix = "w95"; instver_prod = evaluate("%prefix%instver"); doit = execute("%installer_home%\%operating_system%.vrf"); } [ 'UNBOUND_VARIABLE: { required_version = product_version(instver_prod); temp = explode(required_version,"."); required_version = implode(list(first(temp),first(rest(temp)), first(rest(rest(temp))), first(rest(rest(rest(temp))))),"."); signal('failure,instantiate(nls("instver_too_early1","The version of the Installer currently running is %%installer_version%%. The installation you have chosen requires version %%required_version%% or later. Please run version %%required_version%% or later in order to perform this installation."))); } ] if (doit) { /*********************************************************************** Set default installable patch information patch_version = version of installable patch version_to_be_patched = version of product this patch must be applied to ***********************************************************************/ patch_version = product_version(current_product); version_to_be_patched = "8.0.6.0.0"; /********************************************************************** Check that the correct previous version of the product was installed before installing this patch ***********************************************************************/ old_version_to_be_patched_prompt = nls("old_version_to_be_patched_prompt", "%%product_label%% %%version_to_be_patched%% must be installed for this patch installation to continue. Please install %%product_label%% %%version_to_be_patched%% before installing this patch."); old_version_to_be_patched_content = nls("old_version_to_be_patched_content", "Old Product Version"); old_version_to_be_patched_help = nls("old_version_to_be_patched_help", "In order for this product to function properly, the files in this patch may only be installed over %%product_label%% version %%version_to_be_patched%%. You must install %%product_label%% %%version_to_be_patched%% before continuing with this installation."); old_patch_prompt = nls("old_patch_prompt", "You are attempting to install this patch over a later version of %%product_label%%. This is not supported. If you require a patch for this later product version, please contact Oracle. "); old_patch_content = nls("old_patch_content", "Old Patch Version"); old_patch_help = nls("old_patch_help", "If you wish to install a patch over this later version of %%product_label%%, you must contact Oracle for a later version of this patch. Downgrades of patches are not supported."); no_version_to_be_patched_prompt = nls("no_version_to_be_patched_prompt", "%%product_label%% %%version_to_be_patched%% must be installed for this patch installation to continue. Please install %%product_label%% %%version_to_be_patched%% before installing this patch."); no_version_to_be_patched_content = nls("no_version_to_be_patched_content", "Missing Product"); no_version_to_be_patched_help = nls("no_version_to_be_patched_help", "In order for this product to function properly, the files in this patch may only be installed over %%product_label%% version %%version_to_be_patched%%. You must install %%product_label%% %%version_to_be_patched%% before continuing with this installation."); same_version_to_be_patched_prompt = nls("same_version_to_be_patched_prompt","The patch %%product_label%% %%patch_version%% is already installed. Are you sure you want to reinstall?"); same_version_to_be_patched_content = nls("same_version_to_be_patched_content","Patch Already Installed"); same_version_to_be_patched_help = nls("same_version_to_be_patched_help","The patch %%product_label%% %%patch_version%% is already installed. Choose 'Yes' to continue or 'No' to cancel this installation."); if (registered("w32netclt80") || registered("ntnetsrv80")) { { /*** Check if the install type is typical. If it is, then do NOT prompt the user if he wants re-install the product. ***/ if(registered("w32netclt80")) { installer_registry=registration("w32netclt80"); } if(registered("ntnetsrv80")) { installer_registry=registration("ntnetsrv80"); } TYPICAL_INSTALL = evaluate("CHECK_RSF_NETCLT", 'GLOBAL); if (TYPICAL_INSTALL && (platform() == "nt")) { { NT_version = win32_get_value("HKEY_LOCAL_MACHINE", "Software\Microsoft\Windows NT\CurrentVersion", "CurrentVersion");} ['INVALID_KEY, 'FILE_NOT_FOUND, 'OS_ERROR: continue();] if (not(NT_version < "5.0")) { rsf_version_to_not_patch = "8.0.6.3.2c"; if (same_version(installer_registry, rsf_version_to_not_patch)) { refresh_map_file = FALSE; doit = FALSE; return(0); } } } } ['UNBOUND_VARIABLE: { /**** The install type is Custom. So you prompt the user if he'd like to re-install a product if it is already installed ****/ if(earlier_version(installer_registry,version_to_be_patched)) { information_dialog(instantiate(old_version_to_be_patched_prompt), instantiate(old_version_to_be_patched_content), instantiate(old_version_to_be_patched_help)); refresh_map_file = FALSE; doit = FALSE; return(0); } if(later_version(installer_registry,patch_version)) { information_dialog(instantiate(old_patch_prompt), instantiate(old_patch_content), instantiate(old_patch_help)); refresh_map_file = FALSE; doit = FALSE; return(0); } else { if(same_version(installer_registry,patch_version)) { if(not(yesno_dialog(instantiate(same_version_to_be_patched_prompt),FALSE, instantiate(same_version_to_be_patched_content), instantiate(same_version_to_be_patched_help)))) { refresh_map_file = FALSE; doit = FALSE; return(0); } } } } ] } else { information_dialog(instantiate(no_version_to_be_patched_prompt), instantiate(no_version_to_be_patched_content), instantiate(no_version_to_be_patched_help)); refresh_map_file = FALSE; doit = FALSE; return(0); } /***********FOR TYPICAL INSTALL ONLY******************* Begin XP update: If the w32rsf is already installed with the same version as in the patch then do not install rsf. This is added for XP. ******************************************************/ { INSTALL_NETCLT = evaluate("CHECK_RSF_NETCLT", 'GLOBAL); if (INSTALL_NETCLT && (platform() == "nt")) { { NT_version = win32_get_value("HKEY_LOCAL_MACHINE", "Software\Microsoft\Windows NT\CurrentVersion", "CurrentVersion");} ['INVALID_KEY, 'FILE_NOT_FOUND, 'OS_ERROR: continue();] if (not(NT_version < "5.0")) { rsf_version_to_also_not_patch = "8.0.6.3.2c"; if (same_version(installer_registry, rsf_version_to_also_not_patch)) { refresh_map_file = FALSE; doit = FALSE; return(0); } } } } [ 'UNBOUND_VARIABLE: { /* You'd get this error in the CUSTOM install. The variable CHECK_RSF_NETCLT is set in USER.STP file for TYPICAL install */ continue(); } ] /**********END FOR TYPICAL INSTALL ONLY******************/ } /************* Begin RSF XP updates ***************/ /*********************************************************************** Check if the dlls are in use. Here is how: 1) Make a copy of the dll. Because there is no gaurantee that the component will always get installed. 2) Delete the original. If you get an exception the dll is in use. 3) If deleted then move the copy back to the original. 4) If not delete the copy. ***********************************************************************/ if (doit && (platform() == "nt")) { { NT_version = win32_get_value("HKEY_LOCAL_MACHINE", "Software\Microsoft\Windows NT\CurrentVersion", "CurrentVersion");} ['INVALID_KEY, 'FILE_NOT_FOUND, 'OS_ERROR: continue();] if (not(NT_version < "5.0")) { dlls_to_patch = list("%ORACLE_HOME%\bin\nz80.dll", "%ORACLE_HOME%\bin\nt80.dll", "%ORACLE_HOME%\bin\ns80.dll", "%ORACLE_HOME%\bin\nr80.dll", "%ORACLE_HOME%\bin\npl80.dll", "%ORACLE_HOME%\bin\nng80.dll", "%ORACLE_HOME%\bin\nnfn80.dll", "%ORACLE_HOME%\bin\nnfg80.dll", "%ORACLE_HOME%\bin\nnfd80.dll", "%ORACLE_HOME%\bin\nnci80.dll", "%ORACLE_HOME%\bin\nms80.dll", "%ORACLE_HOME%\bin\nmp80.dll", "%ORACLE_HOME%\bin\nl80.dll", "%ORACLE_HOME%\bin\ni80.dll", "%ORACLE_HOME%\bin\ncr80.dll", "%ORACLE_HOME%\bin\nasns80.dll"); while (not(empty(dlls_to_patch))) { GOON = TRUE; PROMPT_REBOOT=false; patch_it = first(dlls_to_patch); { dlls_to_patch = rest(dlls_to_patch); } ['EMPTY_LIST: { /* Not needed really */ dlls_to_patch=list(); continue(); } ] if(exists(patch_it)) { temp = explode(patch_it); add(temp, "_bak"); temp_file = implode(temp, ""); if (exists(temp_file)) { { remove_file(temp_file); } [ 'OS_ERROR,'INVALID_FILE_NAME,'PERMISSION_DENIED, 'WRITE_ERROR: { remove_file(patch_it); GOON=FALSE; PROMPT_REBOOT=TRUE; } ] } if (GOON) { { copy_file(patch_it, temp_file); } [ 'OS_ERROR,'INVALID_FILE_NAME,'PERMISSION_DENIED, 'WRITE_ERROR: { /* This code should get executed only if the copy of the dll already exists */ } ] { remove_file(patch_it); move_file(temp_file, patch_it); } [ 'OS_ERROR,'INVALID_FILE_NAME,'PERMISSION_DENIED, 'WRITE_ERROR: { PROMPT_REBOOT=true; remove_file(temp_file); move_file(patch_it, temp_file); continue(); } ] }/* if GOON */ } } { if (PROMPT_REBOOT) { PROMPTED_ALREADY = evaluate("PROMPT_REBOOT_FOR_DLL_UPGRADE", 'GLOBAL); if (not(PROMPTED_ALREADY)) { set("PROMPT_REBOOT_FOR_DLL_UPGRADE", TRUE, 'GLOBAL); information_dialog("Some of the dlls are in use. Reboot is needed at the end of the installation"); } } } [ 'UNBOUND_VARIABLE: { continue(); } ] }/* Matches if (not NT_VERSION */ }/* if (doit) /************* End RSF XP updates ***************/ /*********************************************************************** Bind string variables & prompt strings... ***********************************************************************/ if (doit) { installing_scripts = nls("installing_scripts", "Installing %%product_label%% Scripts..."); installing_executables = nls("installing_executables", "Installing %%product_label%% Executables..."); installing_patch = nls("installing_patch", "Logging Patch Installation..."); modifying_config = nls("modifying_config", "Modifying NT Registry..."); registering = nls("registering","Registering %%product_label%%..."); /***************************************************************************** Start processing ... *****************************************************************************/ ui_product(product_label); /*********************************************************************** Return total size of files ... ***********************************************************************/ return(sum(exec, patch)); } else { refresh_map_file = FALSE; return(0); } }