| |
Inabus
Posts: 5
Score: 0
Joined: 9/28/2004
From:
Status: offline
|
Problem: I have packaged up Oracle 6i, 8i and Dev2k. Now anyone who has used these versions knows that Dev2k MUST be the default home and if you install 8i 1st and then try to install Dev2k it wont work as Dev2k cant make itself the Default Home as 8i would of take it. Resolution: I am attempting to write VBScript that I can add into my MSI installers that will sort out the registry for me and modify the default home settings and the various keys that go with it. The current code that I have is as follows: function getregvalue(strKeyPath,strValueName) oReg.GetSTRINGValue HKEY_LOCAL_MACHINE,strkeypath,strvaluename,valueresult getregvalue = lcase(valueresult) end function const HKEY_LOCAL_MACHINE = &H80000002 strComputer = "." Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_ strComputer & "\root\default:StdRegProv") if isnull(getregvalue("software\oracle\all_homes","home_counter")) then wscript.Echo "No Oracle Installed!" elseif getregvalue("software\oracle","oracle_home") = "c:\orant" then WScript.Echo "Oracle Developer 2000 Installed!" else WScript.Echo "Oracle Installed!" End If This is currently in development which is why I only echo out my responses however what I would like to know is using the scripts above how can I rename reg keys. Example: I want to install Dev2k onto a machine that has already got Oracle 8i installed as the default_home. I would need to rename the Home0, ID0 and Default_Home up 1 number so as well as moving any other installations after Home0 up 1 number as well. I would of installed Dev2k under Home90, ID90 and would therefore need to rename them back to Home0 and ID0! Any help on this would be creatly appreciated as I am having fun searching the web trying to find snippets of code that can help, and as you can see above I am getting there slowly but would like any help you guys can offer \0/ Regards, Paul
|
|