ODBC installation failed after migration to wpat 2.2

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
jlatieule
Messages: 59
Registration: July 3, 2019 - 9:18 AM

September 2, 2022 - 12:44

Good morning,


In wapt 1.8, a package allowed the installation of the Oracle client with ODBC, but this is no longer possible following the upgrade to wapt 2.2
I have the impression that I have an error in the output that is preventing me from going any further
How can I ignore it or force it?

The ODBC installation is done using the following PowerShell command

Code: Select all

Add-OdbcDsn -DriverName "Oracle dans OraClient11g_home1" -DsnType System -Name LOGI -SetPropertyValue @("Server=LOGI", "Description=LOGI", "User=LOGI")
In the PowerShell console, I get an error message, but it's not a blocking issue
Add-OdbcDsn: Driver ConfigDSN, ConfigDriver, or ConfigTranslator failed (Installer error code: 11).
At line:1 char: 1
+ Add-OdbcDsn -DriverName "Oracle in OraClient11g_home1" -DsnType Sys ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo: NotSpecified: (LOGI (Source of...e 32-bit ODBC):Root/Microsoft/...SFT_OdbcDsnTask) [Add-OdbcDsn], CimException
+ FullyQualifiedErrorId: MI RESULT 0,Add-OdbcDs
I hid it by adding arguments -errorAction silentlyContinue

Code: Select all

Add-OdbcDsn -DriverName "Oracle dans OraClient11g_home1" -DsnType System -Name LOGI -SetPropertyValue @("Server=LOGI", "Description=LOGI", "User=LOGI") -errorAction silentlyContinue
The return of the PyScripter console is

Code: Select all

Client Oracle déjà installé
Mise à jour du fichier TnsName
Installation des drivers ODBC
2022-09-02 12:41:41,441 CRITICAL Fatal error in install script: CalledProcessErrorOutput: Command 'powershell -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -OutputFormat text -EncodedCommand "JABQAHIAbwBnAHIAZQBzAHMAUAByAGUAZgBlAHIAZQBuAGMAZQAgAD0AIAAiAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAIgAKAEEAZABkAC0ATwBkAGIAYwBEAHMAbgAgAC0ARAByAGkAdgBlAHIATgBhAG0AZQAgACIATwByAGEAYwBsAGUAIABkAGEAbgBzACAATwByAGEAQwBsAGkAZQBuAHQAMQAxAGcAXwBoAG8AbQBlADEAIgAgAC0ARABzAG4AVAB5AHAAZQAgAFMAeQBzAHQAZQBtACAALQBOAGEAbQBlACAATABPAEcASQAgAC0AUABsAGEAdABmAG8AcgBtACAAMwAyAC0AYgBpAHQAIAAtAFMAZQB0AFAAcgBvAHAAZQByAHQAeQBWAGEAbAB1AGUAIABAACgAIgBTAGUAcgB2AGUAcgA9AEwATwBHAEkAIgAsACAAIgBEAGUAcwBjAHIAaQBwAHQAaQBvAG4APQBMAE8ARwBJACIALAAgACIAVQBzAGUAcgA9AEwATwBHAEkAIgApACAALQBlAHIAcgBvAHIAQQBjAHQAaQBvAG4AIABzAGkAbABlAG4AdABsAHkAQwBvAG4AdABpAG4AdQBlACAAIAB8ACAAQwBvAG4AdgBlAHIAdABUAG8ALQBKAHMAbwBuACAA" ' returned non-zero exit status 1.
Output::
Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\setuphelpers_windows.py", line 1074, in run_powershell
    result = run(cmd,
  File "C:\Program Files (x86)\wapt\waptutils.py", line 2132, in run
    raise CalledProcessErrorOutput(proc.returncode, cmd, ''.join(output))
waptutils.CalledProcessErrorOutput: Command 'powershell -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -OutputFormat text -EncodedCommand "JABQAHIAbwBnAHIAZQBzAHMAUAByAGUAZgBlAHIAZQBuAGMAZQAgAD0AIAAiAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAIgAKAEEAZABkAC0ATwBkAGIAYwBEAHMAbgAgAC0ARAByAGkAdgBlAHIATgBhAG0AZQAgACIATwByAGEAYwBsAGUAIABkAGEAbgBzACAATwByAGEAQwBsAGkAZQBuAHQAMQAxAGcAXwBoAG8AbQBlADEAIgAgAC0ARABzAG4AVAB5AHAAZQAgAFMAeQBzAHQAZQBtACAALQBOAGEAbQBlACAATABPAEcASQAgAC0AUABsAGEAdABmAG8AcgBtACAAMwAyAC0AYgBpAHQAIAAtAFMAZQB0AFAAcgBvAHAAZQByAHQAeQBWAGEAbAB1AGUAIABAACgAIgBTAGUAcgB2AGUAcgA9AEwATwBHAEkAIgAsACAAIgBEAGUAcwBjAHIAaQBwAHQAaQBvAG4APQBMAE8ARwBJACIALAAgACIAVQBzAGUAcgA9AEwATwBHAEkAIgApACAALQBlAHIAcgBvAHIAQQBjAHQAaQBvAG4AIABzAGkAbABlAG4AdABsAHkAQwBvAG4AdABpAG4AdQBlACAAIAB8ACAAQwBvAG4AdgBlAHIAdABUAG8ALQBKAHMAbwBuACAA" ' returned non-zero exit status 1.
Output:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\common.py", line 4057, in install_wapt
    exitstatus = setup.install()
  File "c:\waptdev\ophlm-oracle-11g_11.2.0-6_windows_PROD-wapt\setup.py", line 50, in install
    run_powershell('Add-OdbcDsn -DriverName "Oracle dans OraClient11g_home1" -DsnType System -Name LOGI -Platform 32-bit -SetPropertyValue @("Server=LOGI", "Description=LOGI", "User=LOGI") -errorAction silentlyContinue')
  File "C:\Program Files (x86)\wapt\setuphelpers_windows.py", line 1078, in run_powershell
    raise CalledProcessErrorOutput(e.returncode, cmd, e.output)
waptutils.CalledProcessErrorOutput: Command 'powershell -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -OutputFormat text -EncodedCommand "JABQAHIAbwBnAHIAZQBzAHMAUAByAGUAZgBlAHIAZQBuAGMAZQAgAD0AIAAiAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAIgAKAEEAZABkAC0ATwBkAGIAYwBEAHMAbgAgAC0ARAByAGkAdgBlAHIATgBhAG0AZQAgACIATwByAGEAYwBsAGUAIABkAGEAbgBzACAATwByAGEAQwBsAGkAZQBuAHQAMQAxAGcAXwBoAG8AbQBlADEAIgAgAC0ARABzAG4AVAB5AHAAZQAgAFMAeQBzAHQAZQBtACAALQBOAGEAbQBlACAATABPAEcASQAgAC0AUABsAGEAdABmAG8AcgBtACAAMwAyAC0AYgBpAHQAIAAtAFMAZQB0AFAAcgBvAHAAZQByAHQAeQBWAGEAbAB1AGUAIABAACgAIgBTAGUAcgB2AGUAcgA9AEwATwBHAEkAIgAsACAAIgBEAGUAcwBjAHIAaQBwAHQAaQBvAG4APQBMAE8ARwBJACIALAAgACIAVQBzAGUAcgA9AEwATwBHAEkAIgApACAALQBlAHIAcgBvAHIAQQBjAHQAaQBvAG4AIABzAGkAbABlAG4AdABsAHkAQwBvAG4AdABpAG4AdQBlACAAIAB8ACAAQwBvAG4AdgBlAHIAdABUAG8ALQBKAHMAbwBuACAA" ' returned non-zero exit status 1.
Output:

FATAL ERROR : CalledProcessErrorOutput: Command 'powershell -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -OutputFormat text -EncodedCommand "JABQAHIAbwBnAHIAZQBzAHMAUAByAGUAZgBlAHIAZQBuAGMAZQAgAD0AIAAiAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAIgAKAEEAZABkAC0ATwBkAGIAYwBEAHMAbgAgAC0ARAByAGkAdgBlAHIATgBhAG0AZQAgACIATwByAGEAYwBsAGUAIABkAGEAbgBzACAATwByAGEAQwBsAGkAZQBuAHQAMQAxAGcAXwBoAG8AbQBlADEAIgAgAC0ARABzAG4AVAB5AHAAZQAgAFMAeQBzAHQAZQBtACAALQBOAGEAbQBlACAATABPAEcASQAgAC0AUABsAGEAdABmAG8AcgBtACAAMwAyAC0AYgBpAHQAIAAtAFMAZQB0AFAAcgBvAHAAZQByAHQAeQBWAGEAbAB1AGUAIABAACgAIgBTAGUAcgB2AGUAcgA9AEwATwBHAEkAIgAsACAAIgBEAGUAcwBjAHIAaQBwAHQAaQBvAG4APQBMAE8ARwBJACIALAAgACIAVQBzAGUAcgA9AEwATwBHAEkAIgApACAALQBlAHIAcgBvAHIAQQBjAHQAaQBvAG4AIABzAGkAbABlAG4AdABsAHkAQwBvAG4AdABpAG4AdQBlACAAIAB8ACAAQwBvAG4AdgBlAHIAdABUAG8ALQBKAHMAbwBuACAA" ' returned non-zero exit status 1.
Output:
Exit code:  3
>>> 
System and Network Administrator at Domitia Habitat
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

September 2, 2022 - 2:33 PM

I tried it here (outside of Wapt);

`silentlyContinue` in PowerShell doesn't seem to work and returns an exit code 1.

Strange.
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

September 2, 2022 - 4:20 PM

Have you tried using odbcconf? (I admit I'm a bit allergic to PowerShell) :-) ) ? (syntax needs checking, I don't have Oracle ODBC on my machine)

Code: Select all

odbcconf configsysdsn "Oracle dans OraClient11g_home1" "DSN=LOGI;SERVER=LOGI;DESCRIPTION=LOGI,USER=LOGI"
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
jlatieule
Messages: 59
Registration: July 3, 2019 - 9:18 AM

September 6, 2022 - 5:36 PM

I'll test with odbcconf, but two years ago when I designed the package I already saw the end-of-support alert: https://docs.microsoft.com/fr-fr/sql/od ... rver-ver16
Note:

ODBCCONF.exe will be removed in a future version of Windows Data Access Components. Avoid using this feature and plan to modify any applications that currently use it. You can use PowerShell commands to manage drivers and data sources. For more information about these PowerShell commands, see Windows Data Access Components cmdlets.
I am hesitant to use it because the Oracle client is required for certain data extractions via Excel.
Preferably, I would like to stick with an installation using PowerShell.

It's strange because it worked fine with wapt 1.8; something must have changed on the Python side following the version upgrade
System and Network Administrator at Domitia Habitat
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

September 8, 2022 - 4:53 PM

Is the driver 32-bit or 64-bit? If the driver is 32-bit, be careful, as the PowerShell script launched by Wapt is 64-bit. If this is the case, you need to add the following parameter
-32-bit platform
We need to avoid the errorAction silently ignore, it's not very clean.

If the error code is "normal", it must be added as a parameter to the run_powershell function with the accept_returncodes option.

Sincerely,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Locked