I'm working on a msi-package for Oracle 10g.

An IP-Address is added in the registry:
[HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\OracleMTSRecoveryService\Protid_0]
"Host"="IP-ADRESS"
"Name"="HTTP"
"Port"="2030"

The ip that is added is the ip on the computer i made the setup capture on. Is there anyway to make this dynamic, so that it takes the ip from the computer/s we will install the package on?



Thanks for a great board! I had ODBC-problems too but solved it by reading here!
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Hi there!

I once made a VBS Custom Action to get the client IP.
Just be aware of that the registry will not change if the IP on the computer change.

I did rem some of it, to make it fit my case, maybe you need to modify it.
I have also changed so it only takes IP-adresses starting with "10."
Then can you just get the IP from the propery HOSTIP.

I have maked it to run "After InstallInitialized" and only when "NOT Installed"

Hope it works!

/Jonas

-------------------------------
Set objWMIService = GetObject("winmgmts:")
Set colNicConfig = objWMIService.ExecQuery("SELECT * FROM " & "Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
For Each objNicConfig In colNicConfig
' WScript.Echo "Network Adapter: " & objNicConfig.Index
' WScript.Echo " IP Address(es):"
'If NOT IsNull(objNicConfig.IPAddress) Then
For Each strIPAddress In objNicConfig.IPAddress
If left(strIPAddress,3) = "10." Then
RealIPAdress = strIPAddress
Session.Property("HOSTIP") = RealIPAdress
End If
Next
'End If
Next
------------------------------
Answered 01/15/2007 by: jonasm
Blue Belt

Please log in to comment
0
Hmm, ok.
So there is no "easy" way to do it. I was hoping to find a system variable or something like that containing the ip.
Script like that really isnt my thing...yet. I will have to learn but there isnt time for it now.

I will see if i can use it. Thanks.
Answered 01/15/2007 by: polkagris
Orange Belt

Please log in to comment
0
I also searched for easier ways, but I did not found any other way.

/Jonas
Answered 01/15/2007 by: jonasm
Blue Belt

Please log in to comment
0
IMHO, you should be using Oracle's silent installation instead of capturing. This should go better for you, as it should get that automatically. Oracle silent installations have been covered in the packages section. If you run into any problems with that just let us know.
Answered 01/15/2007 by: aogilmor
Ninth Degree Black Belt

Please log in to comment
0
jonasm:
I been reading more about vbscripts and I have been trying to use just that.

With your script i get on error for line: Session.Property("HOSTIP") = RealIPAdress

Error: Object Required: 'Session'



Know anything about that.?



I'm also having trouble to get some vb-scripts to work properly withing Wise Package Studio. They work fine alone outside the package. Is it something special I have to think about when calling them (path to the scripts and wscript.exe etc is correct)? For example, put it in deffered section or immediate.
Answered 01/17/2007 by: polkagris
Orange Belt

Please log in to comment
0
I solved it by putting the vb-script in a Wise Script (Execute VBScript in WiseScript Editor).
When putting it in a wise script i could set a wise script variable in the vb-script. Then i used that variable to update the registry key.
Answered 01/17/2007 by: polkagris
Orange Belt

Please log in to comment
0
Yeah, sorry, that was what I was going to write, but I have been in meeting all the day.

/Jonas
Answered 01/17/2007 by: jonasm
Blue Belt

Please log in to comment
0
This script saved me!Thanks a bunch!
Answered 01/02/2008 by: DishaDisha
Senior Yellow Belt

Please log in to comment
0
Using a fixed IP address for the host value in the registry sounds risky, IMHO. What happens if the local machine IP address changes - e.g. in a DHCP environment ?

Instead, you could try either putting the local machine name in this value - which is much easier to retrieve using the "ComputerName" property, or try entering the localhost address, 127.0.0.1, as the host value instead.

What may also be worth trying would be to omit the host registry value from the package and then see if the OracleMTSRecoveryService writes the registry setting dynamically with the correct address when the service starts.

Regards,

Spartacus
Answered 01/03/2008 by: spartacus
Black Belt

Please log in to comment
0
Using a fixed IP address for the host value in the registry sounds risky, IMHO. What happens if the local machine IP address changes - e.g. in a DHCP environment ?Graham, whatever the IP address is, that script will pick it up, irrespective of whether it's static of provided by DHCP. I'm wondering how it would cope on machines with my than one adapter, mind... Not a typical scenario, that's true, but I like my solutions to be as bullet-proof as possible. There's probably additional code that could be added to determine which is the primary adapter, I guess, but as it stands, it rates an 'OK'.
Answered 01/03/2008 by: VBScab
Red Belt

Please log in to comment
0
hi

Pease let me know that how i can overcome the OracleMTSrecovery service error as i am doing silent installation for oracle 10g.

am creating response file but if i do silent installation then this service gets evoke and unable to apply the patch silently after that.

please suggest me on this..
Answered 11/23/2010 by: vishaujjain121
Senior Yellow Belt

Please log in to comment
0
Two sins in one day: hijacking a thread over 2 years old AND duplicating a post.

Just because you don't get an answer in the timeframe you want, it's very bad form to start posting all over the fora. Thank you.
Answered 11/23/2010 by: VBScab
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity