Accessing ui objects from script

Got a problem you cannot solve? Try here.
Post Reply
klavelle
Posts: 8
Joined: Tue Jul 01, 2008 2:04 pm

Accessing ui objects from script

Post by klavelle »

This may be a dumb question, but I'm trying to figure out how to access UI objects' properties from MSICode.

For example, if I wanted to run some scripts checking for specific registry keys, or disk space, or whatever, I then need to shift some objects around in a specific dialog. So if one of the said scripts reports that there isn't enough disk space, I need to show a specific image and a specific text label in the applicable dialog.

Thoughts?
Alex_Ronquillo
Site Admin
Posts: 364
Joined: Mon Jul 30, 2007 11:51 am
Location: USA
Contact:

Post by Alex_Ronquillo »

klavelle,

The only way in which you can interact with dialogs in through variables. IA does not support changing dialog objects or properties from script.
Alejandro Ronquillo
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
klavelle
Posts: 8
Joined: Tue Jul 01, 2008 2:04 pm

Post by klavelle »

Well, that's unfortunate. Not being able to access UI objects or their properties from MSICode seems like an absolutely massive limitation. Is there any particular reason why this isn't possible?

Are there any plans to implement something like this?
Tiago
Posts: 129
Joined: Thu Jun 18, 2009 9:08 am

No Dynamic UI

Post by Tiago »

Yeah... I wanted to enable/disable the parameters on my custom dialog according to the components selected by the end-user on the "componentstree" dialog, but as stated by Klavelle, so far, that seems to be impossible on IA... A sad thing indeed. :(
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

What did you want to do? You can always use Get Component State into a variable that will read either TRUE or FALSE, and then you can drop a label on your form which has its caption set to that $VARIABLE$, this way you can just enable/disable/show/hide/etc. your dialog controls based on whether $VARIABLE$=TRUE or not.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Tiago
Posts: 129
Joined: Thu Jun 18, 2009 9:08 am

Post by Tiago »

Thanks for the advice, Michael! That worked real fine! :D
Post Reply