I have this code copied from the MSIcode window.
First: the code copy-and-paste as text (Shift+Ctrl+C)
label: Welcome Dialog
Display Dialog: welcome, wait for dialog to return (modal)
if Variable WIZARD Equals CANCEL
GoTo Label: Main Install
end
Second: The same code copied in its native format (Ctrl+C).
~InstallAware Clipboard Data~
~End~
~{1CC2C5D1-E642-46FB-9E0D-BF86F5CC00CD}~
~GoTo Label~
~{DC530343-3280-4B9C-ACF1-70B452B9FC84}~
~Main Install~
~If~
~{BB96B3B1-DA3C-4F49-814F-F01C57B9D4D3}~
~WIZARD~
~0~
~CANCEL~
~FALSE~
~Display Dialog~
~{CF675A11-33E9-45EB-8C5B-85FBC0756FB6}~
~welcome~
~WIZARD~
~TRUE~
~~
~TRUE~
~FALSE~
~Label~
~{7225ACC7-3A8A-4EBF-86C0-39D202808076}~
~Welcome Dialog~
1. It looks like the native copy shows the code in reverse sequence?
2. I'd be interested to know what the lines are saying and the significance of the GUIDs.
3. In the MSIcode the predefined variable WIZARD appears all over the place. Am I right in thinking that whenever you add a command button to a dialog that behind the scenes, IA implicitly wires all buttons to the WIZARD variable?
EDIT: I think I might be onto something here. I added a new button and set the action to set the WIZARD variable. After the dialog was dismissed the value in WIZARD had been converted to the uppercase name of the button control. I named my button Validate and the WIZARD variable was set to VALIDATE.
4. If I'm right with 3 above, can you assign other values to WIZARD? For example, if I had 10 buttons on a dialog how would I return the state of each button, assuming I can NEXT, CANCEL, BACK which seem to be the only standard options you can use?
I've yet to start looking at custom dialogs so I'd like to get an idea what makes the dialogs tick.
Curious about MSIcode and the use of the WIZARD variable.
Curious about MSIcode and the use of the WIZARD variable.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP
InstallAware MVP
-
eugen.cocalea
- Posts: 15
- Joined: Tue Feb 17, 2009 12:54 pm
Actually, the WIZARD variable is set as the return variable for the Display Dialog. If the button on the dialog has 'Return from Dialog', 'Go to Previous Dialog' or 'Go to Next Dialog' in the 'Perform Action', pressing it will put the 'Name' property in uppercase in the return variable set in the Display Dialog line.
So, for 3. you're right, but that is because the return variable of the Display Dialog is set to something else than WIZARD. There is no direct 'magic' link between buttons and the WIZARD variable.
By the way, Go to Next, Go to Previous are useful only in wizard loops. For other cases (let's say you want custom code between panels), you can't use wizard loops and you have to test for which button was pressed (Back / Next) (not for Cancel since it has its own action, but you could still use it for this as well) so 'Return from Dialog' comes handy and you have the return variable to hold the Name of the button you pressed last.
So, for 3. you're right, but that is because the return variable of the Display Dialog is set to something else than WIZARD. There is no direct 'magic' link between buttons and the WIZARD variable.
By the way, Go to Next, Go to Previous are useful only in wizard loops. For other cases (let's say you want custom code between panels), you can't use wizard loops and you have to test for which button was pressed (Back / Next) (not for Cancel since it has its own action, but you could still use it for this as well) so 'Return from Dialog' comes handy and you have the return variable to hold the Name of the button you pressed last.
Eugen?
Thanks for your reply. Since I posted my original thread on the 15th Feb I've learned far more about dialogs so I've got a reasonable understanding of the variables and actions. True, I've not put a lot of effort into the dialogs except to demonstrate some of the basic concepts but I find them so much easier to work with than what I was used to coming from an InstallShield environment.
I'm sure I will refine my knowledge about them as I use them but I'm far more comfortable with them than I was ten days ago.
I also 'rediscovered' Orca and that's been useful in seeing what gets written to the MSI tables. I have to admit, that IA keeps the tables far cleaner than I was used to seeing in IS.
Thanks for your reply. Since I posted my original thread on the 15th Feb I've learned far more about dialogs so I've got a reasonable understanding of the variables and actions. True, I've not put a lot of effort into the dialogs except to demonstrate some of the basic concepts but I find them so much easier to work with than what I was used to coming from an InstallShield environment.
I'm sure I will refine my knowledge about them as I use them but I'm far more comfortable with them than I was ten days ago.
I also 'rediscovered' Orca and that's been useful in seeing what gets written to the MSI tables. I have to admit, that IA keeps the tables far cleaner than I was used to seeing in IS.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP
InstallAware MVP

