[WAPT 1.6.2][Fehler] Erstellung eines Oracle 11-Pakets

Fragen zu WAPT-Paketen / Anfragen und Hilfe bezüglich WAPT-Paketen.
Forumregeln
Community-Forumregeln
* Englischer Support auf www.reddit.com/r/wapt
* Französischer Community-Support ist in diesem Forum verfügbar.
* Bitte kennzeichnen Sie gelöste Themen mit [GELÖST].
* Bitte bearbeiten Sie keine Themen, die mit [GELÖST] markiert sind. Erstellen Sie stattdessen ein neues Thema und verweisen Sie auf das alte.
* Geben Sie die installierte WAPT-Version, die vollständige Versionsnummer und die Build-Nummer (2.2.1.11957 / 2.2.2.12337 / usw.) sowie die Enterprise-/Discovery-Edition an.
* Versionen 1.8.2 und älter werden nicht mehr unterstützt. Fragen zu Version 1.8.2 werden nur beantwortet, wenn sie sich auf ein Upgrade auf eine unterstützte Version (2.1, 2.2 usw.) beziehen.
* Geben Sie das Server-Betriebssystem (Linux/Windows) und die Version (Debian Buster/Bullseye – CentOS 7 – Windows Server 2012/2016/2019) an.
* Geben Sie gegebenenfalls das Betriebssystem des Administrations-/Paketerstellungsrechners und des Rechners mit dem problematischen Agenten an (Windows 7/10/11/Debian 11/etc.).
* Vermeiden Sie es, mehrere Fragen in einem Thema zu stellen, da diese sonst möglicherweise ignoriert werden. Falls mehrere Themen relevant sind, erstellen Sie bitte separate Themen, vorzugsweise nacheinander und nicht gleichzeitig (d. h. vermeiden Sie Spam im Forum).
* Fügen Sie Code-Snippets, Screenshots und andere Bilder direkt in Ihren Beitrag ein. Links zu Pastebin, Bitly und anderen Drittanbieterseiten werden systematisch entfernt.
* Wie in jedem Community-Forum erfolgt die Unterstützung freiwillig durch die Mitglieder. Für kommerziellen Support kontaktieren Sie bitte den Vertrieb von Tranquil IT unter +44 2 40 97 57 55.
oberes
Nachrichten: 8
Anmeldung: 20. Mai 2019 - 14:14 Uhr

20. Mai 2019 – 14:23 Uhr

Guten Morgen,

Ich erstelle gerade ein Paket zur Installation von Oracle 11.

Ich stoße während der Installation auf ein Problem. Für eine unbeaufsichtigte Installation muss setup.exe mit einer Datei ausgeführt werden .rspBisher keine Probleme. Das Problem liegt darin, dass setup.exe den Prozess oui.exe ausführt, der die Installation durchführt (und sich daher sofort wieder schließt). Dadurch stößt WAPT auf einen Fehler und bricht den Vorgang ab, was wiederum zu Fehlern führt.

Ist es also möglich, WAPT anzuhalten, bevor mit dem Rest der Installation fortgefahren wird, während der Prozess oui.exe läuft?

setup.py

Code: Alle auswählen

# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = []

def install():
    print ('Installation clef registre')
    registry_setstring(HKEY_LOCAL_MACHINE, "SOFTWARE\\Oracle",'ImagePath',makepath(programfiles32,'Oracle\Inventory'), type=REG_EXPAND_SZ)
    print('installing far-oracle')
    filecopyto('client.rsp','C:\Windows\Temp')
    run(r'setup.exe -silent -responseFile C:\Windows\Temp\client.rsp')
    filecopyto('Tnsnames.ora','C:\Oracle11\product\11.2.0\client_1\network\admin')
    print ('Installation des drivers ODBC')
    run_powershell('Add-OdbcDsn -DriverName "Oracle dans OraClient11g_home1_32bit" -DsnType System -Name MELODIE -Platform 32-bit -SetPropertyValue "Server=arpetcp"')
    run_powershell('Add-OdbcDsn -DriverName "Oracle dans OraClient11g_home1_32bit" -DsnType System -Name ARPEGE -Platform 32-bit -SetPropertyValue "Server=arpetcp"')
    run_powershell('Add-OdbcDsn -DriverName "Oracle dans OraClient11g_home1_32bit" -DsnType System -Name REQUIEM -Platform 32-bit -SetPropertyValue "Server=arpetcp"')
def uninstall():
    print('uninstalling far-oracle11')
    run('C:\Oracle11\product\11.2.0\client_1\deinstall\deinstall.bat')

Protokolle:

Code: Alle auswählen

Ligne de Commande : install "c:\waptdev\far-oracle-wapt\WAPT\.."
Installing WAPT files c:\waptdev\far-oracle-wapt
Installation clef registre
installing far-oracle
2019-05-20 14:09:40,101 CRITICAL Fatal error in install script: IOError: [Errno 2] No such file or directory: 'C:\\Oracle11\\product\t.2.0\\client_1\network\x07dmin':
Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\common.py", line 3512, in install_wapt
    exitstatus = setup.install()
  File "c:\waptdev\far-oracle-wapt\setup.py", line 12, in install
    filecopyto('Tnsnames.ora','C:\Oracle11\product\11.2.0\client_1\network\admin')
  File "C:\Program Files (x86)\wapt\setuphelpers.py", line 682, in filecopyto
    shutil.copy(filename,target)
  File "C:\Program Files (x86)\wapt\lib\shutil.py", line 133, in copy
    copyfile(src, dst)
  File "C:\Program Files (x86)\wapt\lib\shutil.py", line 97, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 2] No such file or directory: 'C:\\Oracle11\\product\t.2.0\\client_1\network\x07dmin'

FATAL ERROR : IOError: [Errno 2] No such file or directory: 'C:\\Oracle11\\product\t.2.0\\client_1\network\x07dmin'
Exit code:  3
Dank im Voraus !
Matthäus.
Zuletzt bearbeitet von upperm am 21. Mai 2019 um 11:41 Uhr, 1 Mal bearbeitet.
oberes
Nachrichten: 8
Anmeldung: 20. Mai 2019 - 14:14 Uhr

20. Mai 2019 – 20:08 Uhr

Problem „gelöst“!
Ich verwende eine .bat-Datei, wodurch ein Fehler vermieden wird. Es ist wahrscheinlich nicht die beste Methode, aber sie funktioniert.

Ich habe es auch geschafft, die Deinstallation durchzuführen.

Falls also jemand Oracle 11 (32-Bit) einsetzen möchte, hier ist, wie ich vorgegangen bin:

Paketstruktur:
Bild

Der Ordner „Oracle“ enthält die Installationsdateien sowie die Dateien für die Installation und Deinstallation.
Bild

Die Datei install.rsp

Code: Alle auswählen

###############################################################################
## 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=
Die Datei remove.rsp

Code: Alle auswählen

[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=
Die Datei install_oracle.bat

Code: Alle auswählen

start /wait Oracle/install/oui.exe -responseFile C:\Windows\Temp\install.rsp -silent -nowait
Die Datei setup.py

Code: Alle auswählen

# -*- 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')
Matthäus.
Benutzeravatar
htouvet
WAPT-Experte
Nachrichten: 436
Anmeldung: 16. März 2015 - 10:48 Uhr
Kontakt:

20. Mai 2019 – 21:50 Uhr

Normalerweise wartet der Befehl "run" von wapt, bis der aufgerufene Prozess beendet ist.

Das Hauptproblem in Ihrem Code ist das Fehlen des 'r' in den Zeichenketten, wenn diese einen "\" enthalten (ein Zeichen, das in Kombination mit dem folgenden Zeichen in Python auf eine besondere Weise interpretiert wird, es sei denn, wir setzen ein 'r' an den Anfang der Zeichenkette, um 'raw' zu bedeuten, eine "raw"-Zeichenkette).

Dies erklärt die seltsamen Fehler „IOError: [Errno 2] Datei oder Verzeichnis nicht gefunden: 'C:\\Oracle11\\product\t.2.0\\client_1\network\x07dmin'“

Code: Alle auswählen

def install():
    print ('Installation clef registre')
    registry_setstring(HKEY_LOCAL_MACHINE, "SOFTWARE\\Oracle",'ImagePath',makepath(programfiles32,'Oracler','Inventory'), type=REG_EXPAND_SZ)
    print('installing far-oracle')
    filecopyto('client.rsp',r'C:\Windows\Temp')
    run(r'setup.exe -silent -responseFile C:\Windows\Temp\client.rsp')
    filecopyto('Tnsnames.ora',r'C:\Oracle11\product\11.2.0\client_1\network\admin')
    print ('Installation des drivers ODBC')
    run_powershell('Add-OdbcDsn -DriverName "Oracle dans OraClient11g_home1_32bit" -DsnType System -Name MELODIE -Platform 32-bit -SetPropertyValue "Server=arpetcp"')
    run_powershell('Add-OdbcDsn -DriverName "Oracle dans OraClient11g_home1_32bit" -DsnType System -Name ARPEGE -Platform 32-bit -SetPropertyValue "Server=arpetcp"')
    run_powershell('Add-OdbcDsn -DriverName "Oracle dans OraClient11g_home1_32bit" -DsnType System -Name REQUIEM -Platform 32-bit -SetPropertyValue "Server=arpetcp"')

def uninstall():
    print('uninstalling far-oracle11')
    run(r'C:\Oracle11\product\11.2.0\client_1\deinstall\deinstall.bat')
    
Ruhige IT
oberes
Nachrichten: 8
Anmeldung: 20. Mai 2019 - 14:14 Uhr

21. Mai 2019 - 11:40 Uhr

Ja, danke, das ist mir erst später aufgefallen! :)

Die Installation funktioniert jedoch nicht, wenn ich sie mit wapt starte. Ich vermute, dass das Systemkonto das Problem verursacht, da bei der Installation über PyScripter alles einwandfrei funktioniert.

Oracle zeigt mir einen Berechtigungsfehler an:

Code: Alle auswählen

SEVERE: [FATAL] [INS-30131] Echec de la configuration initiale requise pour l'exécution des validations du programme d'installation.
   CAUSE: Echec de l'accès à l'emplacement temporaire.
   ACTION: Assurez-vous que l'utilisateur en cours détient les autorisations nécessaires pour accéder à l'emplacement temporaire.
Selbst wenn das Basisverzeichnis (%tmp% Benutzer) in ein anderes (C:\Temp, C:\Windows\Temp) geändert wird, tritt der Fehler auf.
Benutzeravatar
htouvet
WAPT-Experte
Nachrichten: 436
Anmeldung: 16. März 2015 - 10:48 Uhr
Kontakt:

21. Mai 2019 – 15:28 Uhr

Vielleicht ist mein Tippfehler (Oracler) im Pfad falsch...?


def install():
print('Registry key installation')
registry_setstring(HKEY_LOCAL_MACHINE, "SOFTWARE\\Oracle", 'ImagePath', makepath(programfiles32, 'Oracle', 'Inventory'), type=REG_EXPAND_SZ)
...
Ruhige IT
oberes
Nachrichten: 8
Anmeldung: 20. Mai 2019 - 14:14 Uhr

22. Mai 2019 – 15:15 Uhr

Ich habe meine Tests fortgesetzt, und die Installation funktioniert nun einwandfrei, ohne weitere Probleme. Allerdings erhalte ich anscheinend eine Fehlermeldung, wenn WAPT versucht, den Prozess zu beenden: Zugriff verweigert: psutil.AccessDenied (pid=6328)


Hier ist die aktualisierte setup.py-Datei

Code: Alle auswählen

# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = []
ORACLE_HOME = r'C:\Oracle11\product\11.2.0\client_1'
RegInventory = r'SOFTWARE\Oracle'
RegOracle = r'SOFTWARE\WOW6432Node\Oracle'

def install():
    print ('Installation clef registre')
    registry_setstring(HKEY_LOCAL_MACHINE, RegInventory,'ImagePath',makepath(programfiles32,'Oracle\Inventory'), type=REG_EXPAND_SZ)

    print('Installing far-oracle')
    filecopyto('Oracle\\install.rsp','C:\Windows\Temp')

    run(r'Oracle\install\oui.exe -responseFile C:\Windows\Temp\install.rsp -silent -nowait',timeout=60*60)

    print ('Installation des drivers ODBC')
    run_powershell('Add-OdbcDsn -DriverName "Oracle dans OraClient11g_home1_32bit" -DsnType System -Name MELODIE -Platform 32-bit -SetPropertyValue "Server=arpetcp"')
    run_powershell('Add-OdbcDsn -DriverName "Oracle dans OraClient11g_home1_32bit" -DsnType System -Name ARPEGE -Platform 32-bit -SetPropertyValue "Server=arpetcp"')
    run_powershell('Add-OdbcDsn -DriverName "Oracle dans OraClient11g_home1_32bit" -DsnType System -Name REQUIEM -Platform 32-bit -SetPropertyValue "Server=arpetcp"')

    filecopyto('Oracle\\tnsnames.ora',makepath(ORACLE_HOME,'network\\admin'))
    filecopyto('Oracle\\remove.rsp',makepath(ORACLE_HOME,'deinstall'))

def uninstall():
    print('Uninstalling far-oracle11')

    if isfile(makepath(ORACLE_HOME,'deinstall\\deinstall.bat')):
        run(r'{}\\deinstall/deinstall -silent -paramFile remove.rsp'.format(ORACLE_HOME))

    if reg_key_exists(HKEY_LOCAL_MACHINE,RegOracle):
        run('reg delete HKLM\{} /f'.format(RegOracle))

    if reg_key_exists(HKEY_LOCAL_MACHINE,RegInventory):
        run('reg delete HKLM\{} /f'.format(RegInventory))

    # if service_installed('OracleRemExecService'):
    #    if service_is_running('OracleRemExecService'):
    #        service_stop('OracleRemExecService')

    if isdir(makepath(ORACLE_HOME)):
        remove_tree(r'C:\\Oracle11')

    if isdir(makepath(programfiles32,'Oracle')):
        remove_tree(makepath(programfiles32,'Oracle'))
Hier sind die Protokolle:

Code: Alle auswählen

Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\waptservice\service.py", line 1374, in run
    self.running_task.run()
  File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 515, in run
    self._run()
  File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 960, in _run
    self.result.get('errors',[])))
Exception: Erreur lors de l'installation de [u'far-oracle']: erreurs dans les paquets [[u'far-oracle', PackageEntry(u'far-oracle',u'1.0.5') , u'Traceback (most recent call last):\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4372, in install\n    force=force\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 3591, in install_wapt\n    raise e\nAccessDenied: psutil.AccessDenied (pid=6328)\n']]

Exception: Erreur lors de l'installation de [u'far-oracle']: erreurs dans les paquets [[u'far-oracle', PackageEntry(u'far-oracle',u'1.0.5') , u'Traceback (most recent call last):\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 4372, in install\n    force=force\n  File "C:\\Program Files (x86)\\wapt\\common.py", line 3591, in install_wapt\n    raise e\nAccessDenied: psutil.AccessDenied (pid=6328)\n']]
Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\waptservice\service.py", line 1374, in run
    self.running_task.run()
  File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 515, in run
    self._run()
  File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 1041, in _run
    self.result = self.wapt.audit(self.packagename,force = self.force)
  File "C:\Program Files (x86)\wapt\common.py", line 5654, in audit
    raise Exception('Package %s is not installed' % package)
Exception: Package far-oracle is not installed
Teenager
Nachrichten: 3
Anmeldung: 05. April 2017 - 16:17 Uhr

24. Oktober 2019 - 09:59 Uhr

Ich war schon fast am Verzweifeln, danke fürs Teilen, upperm! :D

Ich habe es genauso gemacht wie du und oui.exe direkt ausgeführt, und es funktioniert einwandfrei. Ich verstehe allerdings nicht, warum die .rsp-Datei nicht direkt aus dem WAPT-Ordner ausgeführt werden kann, obwohl ich die tnsnames-Datei kopieren kann…


Kurze Frage: Am Ende der Installation (oder Deinstallation) wird man aufgefordert, die Eingabeaufforderung mit Enter zu schließen. Wie kann man das umgehen? Mir scheint, solange man das nicht tut, bleibt die Installation aktiv.
oberes
Nachrichten: 8
Anmeldung: 20. Mai 2019 - 14:14 Uhr

24. Oktober 2019 - 10:19 Uhr

Hallo !

Ich persönlich habe diesbezüglich keine Probleme.

Setup-Datei

Code: Alle auswählen

# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = []
ORACLE_HOME = r'C:\Oracle11\product\11.2.0\client_1'
RegInventory = r'SOFTWARE\Oracle'
RegOracle = r'SOFTWARE\WOW6432Node\Oracle'

def install():

    if not isfile(makepath(ORACLE_HOME,'bin\oraclient11.dll')):
        print (r'Installation clef registre')
        registry_setstring(HKEY_LOCAL_MACHINE, RegInventory,'ImagePath',makepath(programfiles32,'Oracle\Inventory'), type=REG_EXPAND_SZ)
        filecopyto('Oracle\\install.rsp','C:\Windows\Temp')

        print(r'Installation Oracle 11')
        run(r'Oracle\install\oui.exe -responseFile C:\Windows\Temp\install.rsp -silent -nowait')
    else:
        print(r'Oracle 11 est deja installe')

    if isfile(makepath(ORACLE_HOME,'bin\oraclient11.dll')):
        print(r'Installation du fichier TnsName')
        filecopyto('Oracle\\tnsnames.ora',makepath(ORACLE_HOME,'network\\admin'))
        filecopyto('Oracle\\remove.rsp',makepath(ORACLE_HOME,'deinstall'))

    print (r'Installation des drivers ODBC')
    run_powershell('Add-OdbcDsn -DriverName "Microsoft ODBC for Oracle" -DsnType System -Name MELODIE -Platform 32-bit -SetPropertyValue "Server=arpetcp"')
    run_powershell('Add-OdbcDsn -DriverName "Microsoft ODBC for Oracle" -DsnType System -Name ARPEGE -Platform 32-bit -SetPropertyValue "Server=arpetcp"')
    run_powershell('Add-OdbcDsn -DriverName "Microsoft ODBC for Oracle" -DsnType System -Name REQUIEM -Platform 32-bit -SetPropertyValue "Server=arpetcp"')
    run_powershell('Add-OdbcDsn -DriverName "Microsoft ODBC for Oracle" -DsnType System -Name MAESTRO -Platform 32-bit -SetPropertyValue "Server=arpetcp"')

def uninstall():

    if isfile(makepath(ORACLE_HOME,'deinstall\\deinstall.bat')):
        print(r'Desinstallation Oracle 11')
        run(r'{}\\deinstall/deinstall -silent -paramFile remove.rsp'.format(ORACLE_HOME))

    if reg_key_exists(HKEY_LOCAL_MACHINE,RegOracle):
        print(r'Suppression clef registre Oracle')
        run('reg delete HKLM\{} /f'.format(RegOracle))

    if reg_key_exists(HKEY_LOCAL_MACHINE,RegInventory):
        print(r'Suppression clef registre Oracle Inventory')
        run('reg delete HKLM\{} /f'.format(RegInventory))

    # if service_installed('OracleRemExecService'):
    #    if service_is_running('OracleRemExecService'):
    #        service_stop('OracleRemExecService')

    if isdir(makepath(ORACLE_HOME)):
        print(r'Suppression du répertoire Oracle')
        remove_tree(r'C:\\Oracle11')

    if isdir(makepath(programfiles32,'Oracle')):
        print(r'Suppression du répertoire Oracle Inventory')
        remove_tree(makepath(programfiles32,'Oracle'))
Antwortdatei für die Installation (install.rsp)

Code: Alle auswählen

###############################################################################
## 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=Runtime
#------------------------------------------------------------------------------
#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=
Deinstallationsantwortdatei (remove.rsp)

Code: Alle auswählen

[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=
Teenager
Nachrichten: 3
Anmeldung: 05. April 2017 - 16:17 Uhr

24. Oktober 2019 - 11:43 Uhr

Ich glaube, ich habe mich zu früh gefreut …

Über PyScripter verlief die Installation reibungslos, da ich oui.exe nun direkt ausführe.

Wenn ich das Paket jedoch auf dem üblichen Weg starte, erhalte ich denselben Fehler wie du: AccessDenied: psutil.AccessDenied (pid=11056).

Nachtrag: Trotz des oben genannten Fehlers wird die Installation korrekt abgeschlossen. Ich habe es mit einem längeren Timeout und sogar mit accept_returncodes=[0,1601,3] (da ich den Exit-Code 3 erhalte) versucht, aber es hat sich nichts geändert.

Nachtrag 2: Ich konnte das Problem umgehen, indem ich das Installationsprogramm über die Eingabeaufforderung gestartet habe.
jlatieule
Nachrichten: 59
Anmeldung: 3. Juli 2019 - 9:18 Uhr

2. April 2020 - 11:30 Uhr

Guten Morgen,

Nach dem Test ist der zurückgegebene Code nicht 3, sondern -4

Versuchen Sie es mit accept_returncodes=[0,-4]
Ado schrieb: 24. Okt. 2019 - 11:43 Uhr Ich glaube, ich habe mich zu früh gefreut...

Über PyScripter verlief die Installation reibungslos, da ich oui.exe jetzt direkt ausführe.

Wenn ich das Paket jedoch auf dem üblichen Weg ausführe, erhalte ich denselben Fehler wie du: AccessDenied: psutil.AccessDenied (pid=11056).

NACHTRAG: Trotz des oben genannten Fehlers wird die Installation korrekt abgeschlossen... Ich habe es mit einem längeren Timeout und sogar mit accept_returncodes=[0,1601,3] (da ich den Exit-Code 3 erhalte) versucht, aber es hat sich nichts geändert...

NACHTRAG 2: Ich konnte das Problem umgehen, indem ich das Installationsprogramm über die Eingabeaufforderung gestartet habe.
System- und Netzwerkadministrator bei Domitia Habitat
Gesperrt