파워빌더 인스턴스 클라이언트 사용시 오라클 설치 유무 판단하여 PATH 설정하기
/* 인스턴스 클라이언트 사용하기... */
/* 오라클이 설치되었는지 확인하기... */
/* 오라클을 설치했다가 지운경우에는 레지스트리가 정리가 잘 안되기 때문에 문제가 발생할 수 있음... */
//\\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
String sSubkeylist[]
String sGetPath, sSetPath
Long iReceive, iCnt, iPos
iReceive = RegistryKeys("HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE", sSubkeylist[])
if iReceive = -1 then
Messagebox( '오류(RegistryKeys)', '오라클 설치 유무 확인중 오류발생!~r~n~r~n' + '전산담당자에게 연락하십시오!', stopsign!)
Halt
else
iCnt = UpperBound(sSubkeylist[])
if iCnt >= 1 then
/* 이미 오라클이 설치되어있음 :: 통과 */
else
iReceive = RegistryGet("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment", "Path", sGetPath)
if 0 > iReceive then
Messagebox( '오류(RegistryGet)', '오라클 설치 유무 확인중 오류발생!~r~n~r~n' + '전산담당자에게 연락하십시오!', stopsign!)
Halt
else
iPos = Pos(lower(sGetPath), 'instantclient')
if iPos = 0 then iPos = Pos(lower(sGetPath), 'oracle')
if iPos >= 1 then
/* path에 instantclient 또는 oracle 가 존재하면 오라클이 설치되이 있는것으로 간주한다. */
else
if Right(sGetPath, 1) <> ';' then sGetPath += ';'
sSetPath = sGetPath + "C:\ProgramCSU\instantclient_10_2" + ';'
iReceive = RegistrySet("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment", "Path", sSetPath)
if 0 > iReceive then
MessageBox("Path 설정 중 오류 발생", "관리자 권한로 실행하십시오!~r~n~r~n" + &
"사용자 계정 컨트롤을 확인 하십시오!~r~n~r~n" )
HALT
end if
end if
end if
end if
end if
/* 오라클이 설치되었는지 확인하기... */
/* 오라클을 설치했다가 지운경우에는 레지스트리가 정리가 잘 안되기 때문에 문제가 발생할 수 있음... */
//\\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
String sSubkeylist[]
String sGetPath, sSetPath
Long iReceive, iCnt, iPos
iReceive = RegistryKeys("HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE", sSubkeylist[])
if iReceive = -1 then
Messagebox( '오류(RegistryKeys)', '오라클 설치 유무 확인중 오류발생!~r~n~r~n' + '전산담당자에게 연락하십시오!', stopsign!)
Halt
else
iCnt = UpperBound(sSubkeylist[])
if iCnt >= 1 then
/* 이미 오라클이 설치되어있음 :: 통과 */
else
iReceive = RegistryGet("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment", "Path", sGetPath)
if 0 > iReceive then
Messagebox( '오류(RegistryGet)', '오라클 설치 유무 확인중 오류발생!~r~n~r~n' + '전산담당자에게 연락하십시오!', stopsign!)
Halt
else
iPos = Pos(lower(sGetPath), 'instantclient')
if iPos = 0 then iPos = Pos(lower(sGetPath), 'oracle')
if iPos >= 1 then
/* path에 instantclient 또는 oracle 가 존재하면 오라클이 설치되이 있는것으로 간주한다. */
else
if Right(sGetPath, 1) <> ';' then sGetPath += ';'
sSetPath = sGetPath + "C:\ProgramCSU\instantclient_10_2" + ';'
iReceive = RegistrySet("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment", "Path", sSetPath)
if 0 > iReceive then
MessageBox("Path 설정 중 오류 발생", "관리자 권한로 실행하십시오!~r~n~r~n" + &
"사용자 계정 컨트롤을 확인 하십시오!~r~n~r~n" )
HALT
end if
end if
end if
end if
end if