Page 2 of 2

Re: [WAPT 1.6.2][Error] Creating an Oracle 11 package

Published: April 2, 2020 - 11:33 AM
by jlatieule
Good morning,

The path to the .rsp file must be written as an absolute path and not a relative path.

Regarding the use of the Enter key at the end of the silent installation, the -nowait parameter must be added

Code: Select all

oui.exe -silent -force -nowait
Ado wrote: Oct 24, 2019 - 9:59 AM I was starting to despair, thanks for sharing, upperm. :D

I did the same as you, running oui.exe directly, and it works correctly. However, I didn't understand why it wouldn't run the .rsp file directly from the WAPT folder, even though I can copy the tnsnames file...


Quick question: at the end of the installation (or uninstall), it asks you to press Enter to close the command prompt. How do you get around this? Because I have the distinct impression that as long as you don't do it, the installation remains active.

Re: [WAPT 1.6.2][Error] Creating an Oracle 11 package

Published: April 3, 2020 - 3:07 PM
by jlatieule
Upperm, building on your work (congratulations, by the way), here's another suggestion that doesn't use RSP files for installation and uninstallation. As a bonus, there's no need to manipulate registry keys.

Sources for the absence of RSP files: http://www.dadbm.com/oracle-database-cl...onse-file/

The code is thus greatly simplified.

The uninstallation process still needs to be tested when two clients are installed. Are both uninstalled indiscriminately, or not? That is the question :shock: :D

P.S.: In the Oracle folder structure, I've restored the "client" subfolder to its original location in the official Oracle archives. The code needs to be adjusted accordingly.

Code: Select all

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

uninstallkey = []
ORACLE_BASE = r'C:\Oracle'
ORACLE_HOME = r'C:\Oracle\product\11.2.0\client_1'

def install():

    if not isfile(makepath(ORACLE_HOME,'bin\oraclient11.dll')):

        # récupérer le chemin du script
        currentpath = os.path.dirname(os.path.realpath(__file__))
        print("Le chemin du script est : " + currentpath)

        print(r'Installation Oracle 11')
        run(r'Oracle\Client\setup.exe -silent -force -nowait -waitforcompletion FROM_LOCATION=%s\Oracle\client\stage\products.xml oracle.install.client.installType="Runtime" ORACLE_HOME="%s" ORACLE_BASE="%s" DECLINE_SECURITY_UPDATES=true' % (currentpath, ORACLE_HOME, ORACLE_BASE),shell=False,accept_returncodes=[0,-4])
    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'))

    # 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'%s\deinstall\deinstall.bat -silent' % ORACLE_HOME)