RE: verifying Oracle client install on Windows

> 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 
> HKEY_LOCAL_MACHINE/SOFTWARE/Oracle/ALL_HOMES.  
> 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 9.2.0.6.0 - Production on Tue Aug 2 14:34:21 2005

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

SQL>
C:\>


When the Oracle client is installed, you will have:

C:\>echo %errorlevel%
0
(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.

Branimir
--
http://www.freelists.org/webpage/oracle-l

Other related posts: