Last week I needed to an unattended installation of the Oracle Client, in my case version 10.2.0.1.0.

Oracle has a record switch that allows you to record an installation and generate a response file using: setup -record -destinationFile response_file_name. This is documented here.

When you are finished you can use this response file to perform the unattended install, eg setup -silent -responseFile response_file_name.

There is a problem though, the installer (setup.exe) launches a java based installer and immediately returns.

This was a problem for me since I cannot deploy a dependant application if the Oracle install hasn’t finished yet.

I did some googling and found a lot of questions about this subject and saw a common resolution where a script is watching a certain file that is creating when the installation has finished in a loop.

I figured there should be a better wait so I to a closer look at the installer with Ida Pro. I noticed that setup.exe launches another exe. called oui.exe (Oracle Universal Installer) which in turn launches Java.

I also noticed that oui.exe waits for the install to finish using the MsgWaitForMultipleObjects function if a certain variable is True:

MsgWait

It turns out that if we launch oui.exe using start /w instead of setup.exe and pass the switch -WAITFORCOMPLETION the installer will not return until it has finished.

This is my complete job: