Community Forums
Results 1 to 5 of 5

Thread: PowerShell Custom Action - ComboBox Values

  1. #1
    Join Date
    Mar 2014
    Location
    UK, Hampshire
    Posts
    4

    PowerShell Custom Action - ComboBox Values

    Hey,

    Could I ask if someone can give us a quick example of how to populate the Value within a ComboBox from a PowerShell custom action?
    Basic MSI install - PowerShell custom action.

    I can use this just fine..

    set-property -name AZURE_SUBSCRIPTION -value $obj.SubscriptionName

    Which will update my property called AZURE_SUBSCRIPTION with the value of $obj.SubscriptionName

    But that's just a standard property. ComboBoxes use the "ComboBox" table and in there are Value and Text columns within that, so I'm guessing I need to update that table somehow?

    Is this possible?

    Thanks.

  2. #2
    chad.petersen Guest
    PowerShell? I'm not positive since I don't use PowerShell for custom actions, but here's an example using VB that you might be able to port over.

    In a nutshell the MSI boils down to a relational database so you have to open the database and read/write to it.

    ' open and execute a view to the ComboBox table
    Set oView = Session.Database.OpenView("SELECT * FROM `ComboBox`")
    oView.Execute


    http://windows-installer-xml-wix-too...td3811329.html

    It's not specific to InstalShield, but then neither is the ComboBox table.

  3. #3
    Join Date
    Mar 2014
    Location
    UK, Hampshire
    Posts
    4
    Actually that helped, it's lead me on to further realise you can't do it with PowerShell due to the way it interacts with the install session etc.
    I will do it vbscript, thank you for your comment.

    Regards,
    Paul

  4. #4
    chad.petersen Guest
    If that helped I'm am happy. I know sometimes it can be a relief not to keep beating ones head against a given wall - so we can turn and beat our heads against a different wall.

    Cheers!

    Chad

  5. #5
    Join Date
    Aug 2005
    Posts
    534
    Hey Paul,

    I just came across this thread and based on the few lines of sample code you are trying to do the same thing as me: Wire up Azure Powershell to an Install for some reason or another.


    I'm writing my own Powershell support from scratch in Wix DTF however. Let's keep compare notes sometime!
    Cary R.
    Configuration Engineer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •