I think I may have found some of my problem.

 

I didn't have <CustomAction()> _ above the function I send earlier.  Also,
in my query I had 'ListBox' instead of `ListBox`.

 

So, after making the above changes I can see my array element values in the
list box.

 

Now it's off to cycling through the web sites to see if I can get that to
work.  Once all that is up and running, I may inquire as to the high level
steps of creating a virtual directory/application installation in WiX.
After I get these UI changes squared away my plan is to dump the files and
do all of the messy IIS setup (to handle IIS 6 & 7) in a custom action at
the end of the install.  Is that basically the high level goals of doing
this with WiX?

 

Thanks for the help so far!!

 

From: Matt Walker [mailto:mawa...@rcn.com] 
Sent: Tuesday, August 09, 2011 10:09 AM
To: 'wix-users@lists.sourceforge.net'
Subject: RE: Populating a ListBox At Runtime - VB.NET Custom Action
Project...

 

Thanks for the replies so far as they've been helpful (I think).

 

Here's my VB.Net Code, but its blowing up with a 1723 Error.  The action is
schedule as Immediate Execution.

 

Public Shared Function GetSites(ByVal session As Session) As ActionResult

 

        Dim recListBox As Record

        Dim intIndex As Integer

        Dim sqlView As View

        Dim strTest As String() = {"One", "Two", "Three"}

 

        Try

            session.Log("Populating Web Stite List...")

            sqlView = session.Database.OpenView("SELECT * FROM 'ListBox'")

 

            sqlView.Execute()

 

            For intIndex = LBound(strTest) To UBound(strTest)

                recListBox = session.Database.CreateRecord(4)

 

                recListBox.SetString(1, "WEBSITECHOICES2")

                recListBox.SetInteger(2, intIndex + 1)

                recListBox.SetString(3, strTest(intIndex))

                recListBox.SetString(4, strTest(intIndex))

 

                sqlView.Modify(ViewModifyMode.InsertTemporary, recListBox)

 

            Next

 

            sqlView.Close()

 

            session.Log("Web Site List populated successfully.")

 

            'Everything good...

            Return (ActionResult.Success)

 

        Catch ex As Exception

            session.Log("Error:  There was a problem populating web site
list.")

            Return (ActionResult.Failure)

 

        End Try

 

    End Function

 

Does it matter that I don't have any records seeded in my ListBox table at
build-time?  I thought I may have read somewhere that someone built with a
dummy record in the table, deleted then added the new temp records. ??

 

Any further help would be greatly appreciated!!

 

From: Matt Walker [mailto:mawa...@rcn.com] 
Sent: Monday, August 08, 2011 4:07 PM
To: 'wix-users@lists.sourceforge.net'
Subject: Populating a ListBox At Runtime - VB.NET Custom Action Project...

 

    I don't know if I'm on the right path, but maybe someone can help me.
I'm

    currently using InstallShield, but have dabbled in WiX a bit.

    I'm trying to creat a custom action using the WiX VB.NET custom action

    project type in VS 2010. Eventually this custom action will query the
target

    system for existing web sites by name and populate a combo box for

    selection, but for now, I just have an array of values that I want to
shove

    into the listbox just to see that I have working code.

    The associated property on my listbox is WEBSITECHOICES and I know that
I

    have to get the choices into the listbox table, but that is where I hit
the

    wall. I've tried so much that my head is spinning. Does someone out
there

    have a VB.Net code snippet of how to use the Session.OpenView, etc to

    populate this table with my array values?

 

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to