Sako
Sako

Reputation: 125

Oracle Clinet silent install failed with exit code -2

I'm trying to install Oracle Clinet 12.2.0 32bit with silent mode. Oracle setup.exe called by my powershell script failed to install with exit code -2. please anyone tell me setup.exe exit code "-2" meaning and how to fix it.

Set-Location C:\Scripts\OracleClient\client32

Write-Host "Starting Oracle Client install"
$process = (Start-Process .\setup.exe -ArgumentList "-silent -force -waitforcompletion -nowait -ignoreSysPrereqs -ignorePrereq -responseFile C:\Scripts\oracleclient.rsp" -PassThru)
$process.WaitForExit()
Write-Host "Oracle Client install Process exit code : " $process.ExitCode

thanks

Upvotes: 1

Views: 1666

Answers (2)

Daniel Friis
Daniel Friis

Reputation: 11

I tested out and found a problem also resulted in -2 when installing version 19c. Existing environment variable ORACLE_HOME with old path caused the error. setting it to $null solved my problem.

Upvotes: 1

Ultimate Luki
Ultimate Luki

Reputation: 244

Seems like -2 stands for that the client is already installed.

It checks it based on the xml files in C:\Program Files (x86)\Oracle\Inventory\ContentsXML

In the Inventory folder there is also a logs folder where you can find more details.

Upvotes: 1

Related Questions