RE: verifying Oracle client install on Windows

  • From: Branimir Petrovic <BranimirP@xxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 2 Aug 2005 14:53:26 -0400

> From: John Clarke [mailto:jclarke@xxxxxxxxxxxxxxx]

> ... first thing we want to do is check whether Oracle client software 
> is installed on a machine.  If it is installed, the script will do 
> nothing....  

> I was thinking of looking in the registry, under 
> Is this a good idea or the best place to look?  

"Asking" Windows registry about anything, then trysting the answer 
is quite bad idea in my opinion. Better try using something you are 
expected to have if you had Oracle client installed. For instance: 

C:\>echo exit | sqlplus /nolog

SQL*Plus: Release - Production on Tue Aug 2 14:34:21 2005

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


When the Oracle client is installed, you will have:

C:\>echo %errorlevel%
(or you can parse stdout and figure out which release is there)
Without the Oracle client, trial will fail and %errorlevel% will 
be non zero.


Other related posts: