- Jan 18, 2004
 
- 1,334
 
- 0
 
- 71
 
Hey all, I'm using a script that reads everything from the hklm\software\oracle to find the directories that are associated with oracle.  The problem i have with this is I'm trying to find the home directory and not the installed directory, which is what is echoed.  Anyone see any way of helping me out?
Const HKEY_LOCAL_MACHINE = &H80000002
 
strComputer = "."
 
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
 
strKeyPath = "SOFTWARE\Oracle"
objRegistry.EnumValues HKEY_LOCAL_MACHINE, strKeyPath, arrValueNames, arrValueTypes
 
Dim temp
For i = 0 to UBound(arrValueNames)
strValueName = arrValueNames(i)
if strValueName = "ORACLE_HOME" then
temp = strValue
End if
objRegistry.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
Wscript.Echo arrValueNames(i) & " -- " & strValue
Next
WScript.Echo("temp = " & temp)
			
			Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Oracle"
objRegistry.EnumValues HKEY_LOCAL_MACHINE, strKeyPath, arrValueNames, arrValueTypes
Dim temp
For i = 0 to UBound(arrValueNames)
strValueName = arrValueNames(i)
if strValueName = "ORACLE_HOME" then
temp = strValue
End if
objRegistry.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
Wscript.Echo arrValueNames(i) & " -- " & strValue
Next
WScript.Echo("temp = " & temp)
				
		
			