aFrame에서 instantclient 설정하기...
/* CommandParm */
gs_App = "STUMC"
jTier = true
gs_CommandParm = trim( CommandParm ( ) )
if isNull(gs_CommandParm) or gs_CommandParm = '' then
//gs_CommandParm = 'mnp' + soh + 'OUTSIDE'
end if
f = Create n_func_a
Boolean bOracleInstall = false
Boolean bRegSet = false
Boolean b_Valid
String sSubkeylist[]
Long iReceive, iCnt, iPos
String sGetPath, sSetPath, sSetPathApi
gs_CurrentDirectory = GetCurrentDirectory ( )
sSetPath = gs_InstantClient + ';'
sSetPathApi = gs_Common_sys
iReceive = RegistryKeys("HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE", sSubkeylist[])
if iReceive = -1 then
bOracleInstall = false
else
iCnt = UpperBound(sSubkeylist[])
if iCnt >= 1 then
bOracleInstall = true
else
bOracleInstall = false
end if
end if
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
end if
/* 오라클이 설치된것으로 간주할때.. */
bOracleInstall = true
/* 오라클이 설치된것으로 간주할때.. */
if bOracleInstall then
if Pos( sGetPath, gs_Common_sys ) = 0 then
b_Valid = f.SetPath(gs_Common_sys)
if Not(b_Valid) then
Halt
end if
end if
else
iPos = Pos(lower(sGetPath), 'instantclient')
if iPos = 0 then iPos = Pos(lower(sGetPath), 'oracle\product')
if iPos >= 1 then
/* path에 instantclient 또는 oracle\product 가 존재하면 오라클이 설치되어 있는것으로 간주한다. */
if Pos(sGetPath, gs_Common_sys) = 0 then
b_Valid = f.SetPath(gs_Common_sys)
if Not(b_Valid) then
Halt
end if
end if
else // if iPos >= 1 then
iPos = Pos(lower(sGetPath), gs_Common_sys )
if iPos = 0 then
if Right(sGetPath, 1) = ';' then
sSetPath = sGetPath + sSetPath + sSetPathApi
else
sSetPath = sGetPath + ';' + sSetPath + sSetPathApi
end if
else
if Right(sGetPath, 1) = ';' then
sSetPath = sGetPath + sSetPath
else
sSetPath = sGetPath + ';' + sSetPath
end if
end if
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
else
MessageBox("확인", "재부팅 하시면 설치가 완료됩니다.")
HALT
end if
end if
end if
applicationopen_Down()
gs_App = "STUMC"
jTier = true
gs_CommandParm = trim( CommandParm ( ) )
if isNull(gs_CommandParm) or gs_CommandParm = '' then
//gs_CommandParm = 'mnp' + soh + 'OUTSIDE'
end if
f = Create n_func_a
Boolean bOracleInstall = false
Boolean bRegSet = false
Boolean b_Valid
String sSubkeylist[]
Long iReceive, iCnt, iPos
String sGetPath, sSetPath, sSetPathApi
gs_CurrentDirectory = GetCurrentDirectory ( )
sSetPath = gs_InstantClient + ';'
sSetPathApi = gs_Common_sys
iReceive = RegistryKeys("HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE", sSubkeylist[])
if iReceive = -1 then
bOracleInstall = false
else
iCnt = UpperBound(sSubkeylist[])
if iCnt >= 1 then
bOracleInstall = true
else
bOracleInstall = false
end if
end if
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
end if
/* 오라클이 설치된것으로 간주할때.. */
bOracleInstall = true
/* 오라클이 설치된것으로 간주할때.. */
if bOracleInstall then
if Pos( sGetPath, gs_Common_sys ) = 0 then
b_Valid = f.SetPath(gs_Common_sys)
if Not(b_Valid) then
Halt
end if
end if
else
iPos = Pos(lower(sGetPath), 'instantclient')
if iPos = 0 then iPos = Pos(lower(sGetPath), 'oracle\product')
if iPos >= 1 then
/* path에 instantclient 또는 oracle\product 가 존재하면 오라클이 설치되어 있는것으로 간주한다. */
if Pos(sGetPath, gs_Common_sys) = 0 then
b_Valid = f.SetPath(gs_Common_sys)
if Not(b_Valid) then
Halt
end if
end if
else // if iPos >= 1 then
iPos = Pos(lower(sGetPath), gs_Common_sys )
if iPos = 0 then
if Right(sGetPath, 1) = ';' then
sSetPath = sGetPath + sSetPath + sSetPathApi
else
sSetPath = sGetPath + ';' + sSetPath + sSetPathApi
end if
else
if Right(sGetPath, 1) = ';' then
sSetPath = sGetPath + sSetPath
else
sSetPath = sGetPath + ';' + sSetPath
end if
end if
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
else
MessageBox("확인", "재부팅 하시면 설치가 완료됩니다.")
HALT
end if
end if
end if
applicationopen_Down()