Problema "risolto"!
Sto usando un file .bat, che evita di restituire un errore. Probabilmente non è il metodo migliore, ma funziona.
Sono riuscito anche a gestire la disinstallazione.
Quindi, se qualcuno volesse implementare Oracle 11 (32 bit), ecco cosa ho fatto:
Struttura del pacchetto:
La cartella Oracle contiene i file di installazione, nonché i file per l'installazione e la disinstallazione.
Il file
installazione.rsp
Codice: Seleziona tutto
###############################################################################
## Copyright(c) Oracle Corporation 1998, 2013. All rights reserved. ##
## ##
## Specify values for the variables listed below to customize ##
## your installation. ##
## ##
## Each variable is associated with a comment. The comment ##
## can help to populate the variables with the appropriate ##
## values. ##
## ##
###############################################################################
#-------------------------------------------------------------------------------
# Do not change the following system generated value.
#-------------------------------------------------------------------------------
oracle.install.responseFileVersion=http://www.oracle.com/2007/install/rspfmt_clientinstall_response_schema_v11_2_0
#-------------------------------------------------------------------------------
# This variable holds the hostname of the system as set by the user.
# It can be used to force the installation to use an alternative
# hostname rather than using the first hostname found on the system
# (e.g., for systems with multiple hostnames and network interfaces).
ORACLE_HOSTNAME=computer.mshome.net
#-------------------------------------------------------------------------------
# Unix group to be set for the inventory directory.
UNIX_GROUP_NAME=
#-------------------------------------------------------------------------------
# Specify the languages in which the components will be installed.
#
# en : English ja : Japanese
# fr : French ko : Korean
# ar : Arabic es : Latin American Spanish
# bn : Bengali lv : Latvian
# pt_BR: Brazilian Portuguese lt : Lithuanian
# bg : Bulgarian ms : Malay
# fr_CA: Canadian French es_MX: Mexican Spanish
# ca : Catalan no : Norwegian
# hr : Croatian pl : Polish
# cs : Czech pt : Portuguese
# da : Danish ro : Romanian
# nl : Dutch ru : Russian
# ar_EG: Egyptian zh_CN: Simplified Chinese
# en_GB: English (Great Britain) sk : Slovak
# et : Estonian sl : Slovenian
# fi : Finnish es_ES: Spanish
# de : German sv : Swedish
# el : Greek th : Thai
# iw : Hebrew zh_TW: Traditional Chinese
# hu : Hungarian tr : Turkish
# is : Icelandic uk : Ukrainian
# in : Indonesian vi : Vietnamese
# it : Italian
#
# all_langs : All languages
#
# Specify value as the following to select any of the languages.
# Example : SELECTED_LANGUAGES=en,fr,ja
#
# Specify value as the following to select all the languages.
# Example : SELECTED_LANGUAGES=all_langs
SELECTED_LANGUAGES=en,fr,fr_CA
#-------------------------------------------------------------------------------
# Complete path of the Oracle Home
ORACLE_HOME=C:\Oracle11\product\11.2.0\client_1
#-------------------------------------------------------------------------------
# Complete path of the Oracle Base.
ORACLE_BASE=C:\Oracle11
#------------------------------------------------------------------------------
#Name : INSTALL_TYPE
#Datatype : String
#Description: Installation type of the component.
#
# The following choices are available. The value should contain
# only one of these choices.
# - InstantClient
# - Administrator
# - Runtime
# - Custom
#
#Example : INSTALL_TYPE = Administrator
#------------------------------------------------------------------------------
oracle.install.client.installType=Administrator
#------------------------------------------------------------------------------
#Name : oracle.install.client.upgrading
#Datatype : boolean
#Description: whether or not this is an upgrade installation
#
# The following choices are available. The value should contain
# only one of these choices.
# - true
# - false
#
#Example : oracle.install.client.upgrading=true
#------------------------------------------------------------------------------
oracle.install.client.upgrading=false
#-------------------------------------------------------------------------------
# Name : oracle.install.client.customComponents
# Datatype : StringList
#
# This property is considered only if INSTALL_TYPE is set to "Custom"
#
# Description: List of Client Components you would like to install
#
# The following choices are available. You may specify any
# combination of these choices. The components you choose should
# be specified in the form "internal-component-name:version"
# Below is a list of components you may specify to install.
#
# oracle.sqlj:11.2.0.4.0 -- "Oracle SQLJ"
# oracle.rdbms.util:11.2.0.4.0 -- "Oracle Database Utilities"
# oracle.javavm.client:11.2.0.4.0 -- "Oracle Java Client"
# oracle.sqlplus:11.2.0.4.0 -- "SQL*Plus"
# oracle.dbjava.jdbc:11.2.0.4.0 -- "Oracle JDBC/THIN Interfaces"
# oracle.ldap.client:11.2.0.4.0 -- "Oracle Internet Directory Client"
# oracle.rdbms.oci:11.2.0.4.0 -- "Oracle Call Interface (OCI)"
# oracle.precomp:11.2.0.4.0 -- "Oracle Programmer"
# oracle.xdk:11.2.0.4.0 -- "Oracle XML Development Kit"
# oracle.network.aso:11.2.0.4.0 -- "Oracle Advanced Security"
# oracle.oraolap.mgmt:11.2.0.4.0 -- "OLAP Analytic Workspace Manager and Worksheet"
# oracle.network.client:11.2.0.4.0 -- "Oracle Net"
# oracle.network.cman:11.2.0.4.0 -- "Oracle Connection Manager"
# oracle.network.listener:11.2.0.4.0 -- "Oracle Net Listener"
# oracle.ordim.client:11.2.0.4.0 -- "Oracle Multimedia Client Option"
# oracle.odbc:11.2.0.4.0 -- "Oracle ODBC Driver"
# oracle.has.client:11.2.0.4.0 -- "Oracle Clusterware High Availability API"
# oracle.dbdev:11.2.0.4.0 -- "Oracle SQL Developer"
# oracle.rdbms.scheduler:11.2.0.4.0 -- "Oracle Scheduler Agent"
# oracle.ntoramts:11.2.0.4.0 -- "Oracle Services For Microsoft Transaction Server"
# oracle.ntrdbms.admin:11.2.0.4.0 -- "Oracle Administration Assistant for Windows"
# oracle.ntoledb:11.2.0.4.0 -- "Oracle Provider for OLE DB"
# oracle.ntoledb.odp_net_2:11.2.0.4.0 -- "Oracle Data Provider for .NET"
# oracle.aspnet_2:11.2.0.4.0 -- "Oracle Providers for ASP.NET"
# oracle.ntrdbms.perfmon:11.2.0.4.0 -- "Oracle Counters for Windows Performance Monitor"
# oracle.oo4o:11.2.0.4.0 -- "Oracle Objects for OLE"
#
#
# Example : oracle.install.client.customComponents="oracle.precomp:11.2.0.4.0","oracle.oraolap.mgmt:11.2.0.4.0","oracle.rdbms.scheduler:11.2.0.4.0"
#-------------------------------------------------------------------------------
oracle.install.client.customComponents=
#-------------------------------------------------------------------------------
# Host name to be used for by the Oracle Scheduler Agent.
# This needs to be entered in case oracle.rdbms.scheduler is selected in the
# list of custom components during custom install
#
# Example : oracle.install.client.schedulerAgentHostName = acme.domain.com
#------------------------------------------------------------------------------
oracle.install.client.schedulerAgentHostName=
#------------------------------------------------------------------------------
# Port number to be used for by the Oracle Scheduler Agent.
# This needs to be entered in case oracle.rdbms.scheduler is selected in the
# list of custom components during custom install
#
# Example: oracle.install.client.schedulerAgentPortNumber = 1500
#------------------------------------------------------------------------------
oracle.install.client.schedulerAgentPortNumber=
#------------------------------------------------------------------------------
# Specify the auto-updates option. It can be one of the following:
# - MYORACLESUPPORT_DOWNLOAD
# - OFFLINE_UPDATES
# - SKIP_UPDATES
#------------------------------------------------------------------------------
oracle.installer.autoupdates.option=SKIP_UPDATES
#------------------------------------------------------------------------------
# In case MYORACLESUPPORT_DOWNLOAD option is chosen, specify the location where
# the updates are to be downloaded.
# In case OFFLINE_UPDATES option is chosen, specify the location where the updates
# are present.
oracle.installer.autoupdates.downloadUpdatesLoc=
#------------------------------------------------------------------------------
# Specify the My Oracle Support Account Username which has the patches download privileges
# to be used for software updates.
# Example : AUTOUPDATES_MYORACLESUPPORT_USERNAME=abc@oracle.com
#------------------------------------------------------------------------------
AUTOUPDATES_MYORACLESUPPORT_USERNAME=
#------------------------------------------------------------------------------
# Specify the My Oracle Support Account Username password which has the patches download privileges
# to be used for software updates.
#
# Example : AUTOUPDATES_MYORACLESUPPORT_PASSWORD=password
#------------------------------------------------------------------------------
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
#------------------------------------------------------------------------------
# Specify the Proxy server name. Length should be greater than zero.
#
# Example : PROXY_HOST=proxy.domain.com
#------------------------------------------------------------------------------
PROXY_HOST=
#------------------------------------------------------------------------------
# Specify the proxy port number. Should be Numeric and at least 2 chars.
#
# Example : PROXY_PORT=25
#------------------------------------------------------------------------------
PROXY_PORT=0
#------------------------------------------------------------------------------
# Specify the proxy user name. Leave PROXY_USER and PROXY_PWD
# blank if your proxy server requires no authentication.
#
# Example : PROXY_USER=username
#------------------------------------------------------------------------------
PROXY_USER=
#------------------------------------------------------------------------------
# Specify the proxy password. Leave PROXY_USER and PROXY_PWD
# blank if your proxy server requires no authentication.
#
# Example : PROXY_PWD=password
#------------------------------------------------------------------------------
PROXY_PWD=
#------------------------------------------------------------------------------
# Specify the proxy realm.
#
# Example : PROXY_REALM=metalink
#------------------------------------------------------------------------------
PROXY_REALM=
Il file
rimuovere.rsp
Codice: Seleziona tutto
[ENGINE]
#DO NOT CHANGE THIS.
Response File Version=1.0.0.0.0
[GENERIC]
#
OH_HOME_DEINSTALL=false
#
DOMAIN_MANAGED_ASINSTANCE_DEINSTALL=true
#
UNMANAGED_ASINSTANCE_DEINSTALL=false
#
DEINSTALL_IN_ASINSTANCE_MODE=true
#
DEINSTALL INSTANCE LIST=
[SYSTEM]
[APPLICATIONS]
[RELATIONSHIPS]
#
MIDDLEWARE_HOME=
#
WEBLOGIC_HOME=
#
DOMAIN_HOST_NAME=
#
DOMAIN_PORT_NO=7001
#
DOMAIN_USER_NAME=weblogic
#
DOMAIN_USER_PASSWORD=
#
MANAGED_INSTANCE_LIST=
Il file
install_oracle.bat
Codice: Seleziona tutto
start /wait Oracle/install/oui.exe -responseFile C:\Windows\Temp\install.rsp -silent -nowait
Il file
setup.py
Codice: Seleziona tutto
# -*- coding: utf-8 -*-
from setuphelpers import *
uninstallkey = []
ORACLE_HOME = 'C:\Oracle11\product\\11.2.0\client_1'
def install():
print ('Installation clef registre')
registry_setstring(HKEY_LOCAL_MACHINE, "SOFTWARE\\Oracle",'ImagePath',makepath(programfiles32,'Oracle\Inventory'), type=REG_EXPAND_SZ)
print('Installing wapt-oracle')
filecopyto('Oracle\\install.rsp','C:\Windows\Temp')
run('install_oracle.bat')
# Exemple pour ajouter une base ODBC. Pensez à modifier "-Name YOUR_APPS" et "Server=XXXXXXXX"
# print ('Installation des drivers ODBC')
# run_powershell('Add-OdbcDsn -DriverName "Oracle dans OraClient11g_home1_32bit" -DsnType System -Name YOUR_APPS -Platform 32-bit -SetPropertyValue "Server=XXXXXXXX"')
# Copie du fichier TNS Name si besoin
# filecopyto('Oracle\\tnsnames.ora',makepath(ORACLE_HOME,'network\\admin'))
filecopyto('Oracle\\remove.rsp',makepath(ORACLE_HOME,'deinstall'))
def uninstall():
print('Uninstalling wapt-oracle11')
if isfile(makepath(ORACLE_HOME,'deinstall\\deinstall.bat')):
run(r'{}\\deinstall/deinstall -silent -paramFile remove.rsp'.format(ORACLE_HOME))
print('Check if folder still persit and delete')
if isdir(makepath(ORACLE_HOME)):
remove_tree(makepath(ORACLE_HOME))
if isdir(makepath(programfiles32,'Oracle\Inventory')):
remove_tree(makepath(programfiles32,'Oracle\Inventory'))
if registry_readstring(HKEY_LOCAL_MACHINE, "SOFTWARE\\WOW6432Node", 'oracle') :
run('reg delete HKLM\SOFTWARE\WOW6432Node\oracle /f')
if registry_readstring(HKEY_LOCAL_MACHINE, "SOFTWARE", 'oracle') :
run('reg delete HKLM\SOFTWARE\oracle /f')
Matteo.