View Full Version : ComboBox problem

06-02-2004, 06:12 PM
Using InstallShield X

I have created a function to create a drop down with the sites in IIS. The combobox has a custom action attached to it 'DoAction' calling VBScript Function IISWebSites.

Okay. Everything was working fine with the websites in IIS listbox. Now for some reason on Win2k server and Win2003 it only puts in Default Web Site. When you click the list box it looks like it wants to display more but does not. This was working before.
However, when you run on XP it does show 1 or more web sites from IIS in the listbox.

An update:

It is populating the combobox, problem is it won't function as a ddlb. If you arrow up and down with the keyboard it shows all values. Drop-Down List property is set to true. It's strange that it was working properly but now is not.



Const IDOK = 1

Function IISWebSites()
Dim objView, objRecord, viewList, recList
Dim objW3SVC, objIISWebSite, intOrder

'Delete any records that may exist
Set viewList = Database.OpenView("SELECT * FROM `ComboBox`") 'WHERE `Property`='SCTIISWEBSITE'")
Set recList = viewList.Fetch

'delete any existing records
While Not (recList Is Nothing)
viewList.Modify 6, recList ' 6 = delete
Set recList = viewList.Fetch

'Start to populate combo box with IIS web sites found
Set objView = Database.OpenView("select * from `ComboBox`") 'where `Property` = 'SCTIISWEBSITE'")
'enumerate webservers on localhost and populate ComboBox table
Set objW3SVC = GetObject("IIS://localhost/W3SVC")
intOrder = 1

For Each objIISWebSite In objW3SVC
If objIISWebSite.Class = "IIsWebServer" Then
'add site name to ComboBox table (which is used by our dialog ComboBox)
Set objRecord = Installer.CreateRecord(4)
objRecord.StringData(1) = "SCTIISWEBSITE" 'property
objRecord.IntegerData(2) = intOrder 'order
objRecord.StringData(3) = objIISWebSite.Name 'value (WebSite number)
objRecord.StringData(4) = objIISWebSite.ServerComment 'text (WebSite Name)

'now add the record to the table
call objView.Modify(7,objRecord)
intOrder = intOrder + 1
'call objRecord.ClearData()
End If
IISWebSites = IDOK
End Function

06-02-2004, 06:59 PM
Never Mind.

Online helpnet says to put a, and I quote, "large" number for the height if it is a drop down listbox. I had 16 in there and upped it to 50 and it worked.

Can someone give a reasonable definition of "large," is it 50, 100, 200, 500, etc...