Page 1 of 1

Populating combo on dialog

Posted: Fri Aug 24, 2007 2:59 am
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

Posted: Fri Aug 24, 2007 7:31 am
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

Posted: Fri Aug 24, 2007 7:59 am
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.