Populating combo on dialog

Got a problem you cannot solve? Try here.
Post Reply
Bo Andersen
Posts: 33
Joined: Mon Jul 16, 2007 5:07 am
Location: Denmark

Populating combo on dialog

Post by Bo Andersen »

Hi guys,

I want to populate a combo on a dialog with the list of available iis sites - I can get the list into a variable, and also bind the variable to the combo, but my result is still no choices in the combo, but instead a text saying

Default Web Site**MyTestWeb**AnotherWEB

How would a clever person do this? My goal of course is to let the user select what website to install to.

thanks
bo
jimo
Posts: 342
Joined: Fri Aug 19, 2005 10:59 am
Location: Atlanta, GA
Contact:

Post by jimo »

Here is a hint:

Code: Select all

label: Database List
Run Program "$SUPPORTDIR$\\osql.exe" $CLINE$ (WAIT)
Read from Text File $SUPPORTDIR$\\osqloutput.txt into Variable LINE1 (get EOF into ISEOF)
Read from Text File $SUPPORTDIR$\\osqloutput.txt into Variable LINE2 (get EOF into ISEOF)
label: Read osql Output
Read from Text File $SUPPORTDIR$\\osqloutput.txt into Variable NEXTLINE (get EOF into ISEOF)
Parse String $NEXTLINE$ into Variables GARBAGE and NEXTLINE (Split at first occurrence of pattern)
if Variable NEXTLINE Equals 
  GoTo Label: Read Finished
end
if Variable ISEOF not Equals TRUE
  if Variable MYCOUNTER Equals 1
    Set Variable COMBOITEMS to $NEXTLINE$
    Set Variable MYCOUNTER to 2
    else
    Set Variable COMBOITEMS to $COMBOITEMS$$NEWLINE$$NEXTLINE$
  end
  GoTo Label: Read osql Output
end
Jim Oswell
Software Engineering Manager, Dental
Greenway Health, LLC
http://greenwaymedical.com
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

There is a sample project which does exactly what you want! Look at the samples and choose the IIS Web Sites and Folders sample.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Post Reply