/* Copyright (c) Oracle Corporation 1992. All Rights Reserved */ /***************************************************************************** NAME rdbms80.vrf - Windows NT V3 installation verification script for the ORACLE8 RDBMS Installable patch DESCRIPTION This script installs patch files for the ORACLE8 RDBMS product OWNER Alyn Kelley MODIFIED DD-MMM-YY Reason veyunni 12/02/02 - Made the changes needed for XP installation akelley 02/24/95 - Created as template script. akelley 01/16/95 - Updated for Shared Oracle compliance. *****************************************************************************/ { /*********************************************************************** 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. ***************************************************************************/ { doit = execute("%installer_home%\%operating_system%.vrf"); } [ 'UNBOUND_VARIABLE: { required_version = product_version(ntinstver); 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("w32rsf80")) { installer_registry=registration("w32rsf80"); { 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: { /* You'd get this error in the CUSTOM install. The variable CHECK_RSF_NETCLT is set in USER.STP file for TYPICAL install */ installer_registry=registration("w32rsf80"); 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); } /*********************************************************************** Bind path variables... ************************************************************************/ { set_rdbms80 = FALSE; rdbms80 = v7_translate("RDBMS80"); nlsrtl33 = v7_translate("NLSRTL33"); if (not(exists(rdbms80))) signal('UNBOUND_ENVIRONMENT_VARIABLE); } [ 'OS_ERROR,'INVALID_FILE_NAME, 'PERMISSION_DENIED,'UNBOUND_ENVIRONMENT_VARIABLE: { rdbms80 = "%oracle_home%\RDBMS80"; set_rdbms80 = TRUE; nlsrtl33 = "%oracle_home%\NLSRTL33"; } ] } { set_nlsrtl33 = FALSE; nlsrtl33 = translate("NLSRTL33", ora_config, product_filename(current_product)); if (not(exists(nlsrtl33))) signal('UNBOUND_ENVIRONMENT_VARIABLE); } [ 'OS_ERROR,'INVALID_FILE_NAME,'FILE_NOT_FOUND, 'PERMISSION_DENIED,'UNBOUND_ENVIRONMENT_VARIABLE: { nlsrtl33 = "%oracle_home%\NLSRTL33"; set_nlsrtl33 = TRUE; } ] winsys = windows_system_directory(); /*********************************************************************** Bind string variables & prompt strings... ***********************************************************************/ if (doit) { if (platform() == "nt") { /************* 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. ***********************************************************************/ { 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\xa80.dll", "%ORACLE_HOME%\bin\sqllib80.dll", "%ORACLE_HOME%\bin\pls805.dll", "%ORACLE_HOME%\bin\ora805.dll", "%ORACLE_HOME%\bin\nlsrtl33.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 */ /************* End RSF XP updates ***************/ }/*Matches if (platform() == "nt" */ installing_demo = nls("installing_demo", "Installing %%product_label%% Demonstration Files ..."); 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); } }