Get Default Oracle Home Path: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
m (Wikipedia python library) |
m (Updated author and download links, and changed format of some pages.) |
||
Line 54: | Line 54: | ||
</highlight-nsis> | </highlight-nsis> | ||
Page author: Iceman_K | Page author: [[User:Iceman_K|Iceman_K]] |
Revision as of 12:39, 23 April 2005
The Function
; ; Gets the name of the default Oracle Home path ; ; Usage: ; ; Call GetOracleDefaultHomePath ; Pop $0 ; Function GetOracleDefaultHomePath Push $R1 Push $R2 Push $R3 Push $R4 ; Get the name of the default home ReadRegStr $R1 HKLM "SOFTWARE\ORACLE\ALL_HOMES" "DEFAULT_HOME" StrCmp $R1 "" done ; Get the number of homes ReadRegStr $R4 HKLM "SOFTWARE\ORACLE\ALL_HOMES" "HOME_COUNTER" ; Loop through all homes StrCpy $R3 0 loop: IntCmp $R3 $R4 not_found 0 not_found ; Compare the home name to the default home name ReadRegStr $R2 HKLM "SOFTWARE\ORACLE\ALL_HOMES\ID$R3" "NAME" StrCmp $R2 $R1 0 next ; Verify the path of the home ReadRegStr $R2 HKLM "SOFTWARE\ORACLE\ALL_HOMES\ID$R3" "PATH" IfFileExists $R2 0 bad_home StrCpy $R1 $R2 GoTo done bad_home: StrCpy $R1 "" GoTo done next: IntOp $R3 $R3 + 1 GoTo loop not_found: StrCpy $R1 "" done: Pop $R4 Pop $R3 Pop $R2 Exch $R1 FunctionEnd
Page author: Iceman_K