This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: PowerShell Custom Action - ComboBox Values
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 25, 2017
04:56 PM
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.
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.
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 25, 2017
05:33 PM
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-toolset.687559.n2.nabble.com/How-to-populate-a-list-box-in-a-msi-dialog-during-runtime-td3811329.html
It's not specific to InstalShield, but then neither is the ComboBox table.
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-toolset.687559.n2.nabble.com/How-to-populate-a-list-box-in-a-msi-dialog-during-runtime-td3811329.html
It's not specific to InstalShield, but then neither is the ComboBox table.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 25, 2017
07:50 PM
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
I will do it vbscript, thank you for your comment.
Regards,
Paul
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 26, 2017
01:22 PM
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
Cheers!
Chad
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 28, 2017
01:24 PM
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!
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!