Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 3

PowerShell Custom Action - ComboBox Values


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?

Labels (1)
0 Kudos
(4) Replies
Level 9

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`")

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

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.

0 Kudos
Level 9

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.


0 Kudos
Level 11

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!
0 Kudos