Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Registry Query in Wise 1

Status
Not open for further replies.

Nina123

MIS
Mar 11, 2004
2
0
0
US
Hello!
I need help querying the registry using the Wise Windows Installer.
I need to look for the ip address of the pc and replace it with another one. The problem is the IP address location in the registry is not static... it is different in all the machines although the key name is always the same.

Thank you in advance for your help.
 
Why couldn't you use a call to the Internet Protocol Helper (IP Helper) API. I would try tuse this versus make the change in the registry.

my 2 cents
 
How does one capture the registry changes/additions that go with an application and pull them into a *.wsi package? We've been using InControl to generate a list. Are there any established methods for doing this?
 
If your clients and your version of WfWI support VBScript then something like this would work...
Code:
On Error Resume Next
Dim ipAddress, oWMISvc, items, item, i
Set oWMISvc = GetObject("winmgmts:\\.\root\cimv2")
Set items = oWMISvc.ExecQuery("Select * from Win32_NetworkAdapterConfiguration",,48)
For Each item in items
    if isarray(item.IPAddress) then
        for i = lbound(item.IPAddress) to ubound(item.IPAddress)
           ipAddress = ipAddress & item.IPAddress(i) & vbcrlf
         next
    end if
 Next
Session.Property("IPADDRESS") = ipAddress

You can run the script then use the property IPADDRESS.

HtH,

Rob

-Focus on the solution to the problem, not the obstacles in the way.-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top