PDA

View Full Version : Creating a oracle dsn



Errenden
06-10-2004, 02:55 PM
Can anyone tell me how to build a install package that will create a oracle system dsn using Installshield x pro or multi-platform 4.5? Is it even possible to create a dsn during the install? Any help would be appreciated. Thanks.

Errenden

Bill Carlisle
05-10-2005, 01:58 PM
Ever get an answer? I'm installing Oracle...

--------------------------------------------------------------------------------

This is what I have so far...



if (LaunchAppAndWait (SRCDISK ^ "Disk1\\Setup.exe", "-responsefile \""+RSP_FILE+"\" -silent", WAIT) < 0) then
gszLogMsg = "Unable to launch Oracle Setup.exe";
WriteToLog(gszLogMsg);
MessageBox (gszLogMsg,SEVERE);
else
nPercent = 1;
gszLogMsg = "Oracle is now installing, this may take up to 15-20 minutes";
SetStatusWindow(nPercent, gszLogMsg);
WriteToLog(gszLogMsg);

Enable(STATUS);
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
szKey = "SYSTEM\\CurrentControlSet\\Services\\OracleServicePAIN";
szKey1 ="SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{D5946AF2-3399-11D7-AFDD-E5BE1EDF9FCB}";
szKey2 ="SYSTEM\\ControlSet001\\Services\\OraclePAINPagingServer";
szKey3 ="SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\OracleAgent";
szKey4 ="SOFTWARE\\Classes\\TypeLib\\{0BB9AFD1-51A1-11D2-BB7D-00C04FA30080}\\1.0\\0\\win32";
szKey5 ="SOFTWARE\\HQ AFPC\\ManperB Oracle Installer";
szKey6 ="SYSTEM\\ControlSet001\\Control\\Session Manager\\Environment";
szKey7 ="SOFTWARE\\Classes\\CLSID\\{51A5FC60-13DF-11CF-BE51-0020AFE55F5C}\\InprocServer32";
szKey8 ="SOFTWARE\\Classes\\MMDX.MmdxCtrl.1";
szKey9 ="SOFTWARE\\Classes\\CLSID\\{3893B4A0-FFD8-101A-ADF2-04021C007002}";
szKey10="SOFTWARE\\Classes\\CLSID\\{3F63C36E-51A3-11D2-BB7D-00C04FA30080}";
szKey11="SOFTWARE\\ORACLE";
bvKey1 = FALSE;
bvKey2 = FALSE;
bvKey3 = FALSE;
bvKey4 = FALSE;
bvKey5 = FALSE;
bvKey6 = FALSE;
bvKey7 = FALSE;
bvKey8 = FALSE;
bvKey9 = FALSE;
bvKey10 = FALSE;
bvKey11 = FALSE;


// wait until the instance service is installed
svMsg = "Oracle installing - Estimated time remaining is ";

gszLogMsg = "Starting 1st Loop looking for ["+szKey+"]";
WriteToLog(gszLogMsg);

nMinutesRemain = 6;
nSecondsRemain = 0;
nTotalSeconds = (nMinutesRemain*60) + nSecondsRemain;
while nMinutesRemain > 0
// Percentage bar meter
nPercent = nPercent + 1;
nResults = NumToStr (svPercent, nPercent);
bvFOUND = FALSE;

if (!(bvKey1) && (RegDBKeyExist(szKey1)=1)) then
bvKey1 = TRUE;
gszLogMsg = szKey1;
bvFOUND = TRUE;
elseif !(bvKey2) && RegDBKeyExist(szKey2) then
bvKey2 = TRUE;
gszLogMsg = szKey2;
bvFOUND = TRUE;
elseif !(bvKey3) && RegDBKeyExist(szKey3) then
bvKey3 = TRUE;
gszLogMsg = szKey3;
bvFOUND = TRUE;
elseif !(bvKey4) && RegDBKeyExist(szKey4) then
bvKey4 = TRUE;
gszLogMsg = szKey4;
bvFOUND = TRUE;
elseif !(bvKey5) && RegDBKeyExist(szKey5) then
gszLogMsg = szKey5;
bvKey5 = TRUE;
bvFOUND = TRUE;
elseif !(bvKey6) && RegDBKeyExist(szKey6) then
gszLogMsg = szKey6;
bvKey6 = TRUE;
bvFOUND = TRUE;
elseif !(bvKey7) && RegDBKeyExist(szKey7) then
gszLogMsg = szKey7;
bvKey7 = TRUE;
bvFOUND = TRUE;
elseif !(bvKey8) && RegDBKeyExist(szKey8) then
gszLogMsg = szKey8;
bvKey8 = TRUE;
bvFOUND = TRUE;
elseif !(bvKey9) && RegDBKeyExist(szKey9) then
gszLogMsg = szKey9;
bvKey9 = TRUE;
bvFOUND = TRUE;
elseif !(bvKey10) && RegDBKeyExist(szKey10) then
gszLogMsg = szKey10;
bvKey10 = TRUE;
bvFOUND = TRUE;
elseif !(bvKey11) && RegDBKeyExist(szKey11) then
gszLogMsg = szKey11;
bvKey11 = TRUE;
bvFOUND = TRUE;
endif;
if bvFOUND then
gszLogMsg = "Found ["+gszLogMsg+"] %["+svPercent+"]";
else
gszLogMsg = "No Hit on Installed Keys";
endif;
WriteToLog(gszLogMsg);

WriteToLog("Starting 10 second delay");
// Remaining time text meter - smaller increments
// 5 increments x 2 seconds each = 10 seconds delay.
for iCount = 1 to 5
nResults = NumToStr (svMinutesRemain, nMinutesRemain);
nResults = NumToStr (svSecondsRemain, nSecondsRemain);
svTimeRemain = svMinutesRemain + ":" + svSecondsRemain + " minutes.";

nResults = NumToStr (svPercent, nPercent);
gszLogMsg = svPercent+"% "+ svMsg + svTimeRemain;
WriteToLog(gszLogMsg);

SetStatusWindow(nPercent, svMsg + svTimeRemain);
Delay(2);
nTotalSeconds = nTotalSeconds - 2;
nMinutesRemain = nTotalSeconds/60;
nSecondsRemain = nTotalSeconds - (nMinutesRemain*60);
endfor;
WriteToLog("Ending 10 second delay");
endwhile;