Column Macros |
The "Column" command creates some standard definitions which record some useful information about the tables and columns being defined to make reference to the column easier if you are writing custom VBSCRIPT code, these are:
EXAMPLE |
In the following example we wish to avoid hardcoding column numbers or refering to specific VBSCRIPT variables:
<$Table "Dialog"> dim DialogNameTitle <$Row @Where="" @OK=^? > 0^ @Code="Y" *Title="DialogNameTitle"> ;--- Debug stuff -------------------------------------------------- say "" say "DialogName = " & <$COLSTR.Dialog.Dialog> say "Width = " & <$COLINT.Dialog.Width> ;--- Set up the new title in the VB variable mentioned above ------ DialogNameTitle = "[\[]" & <$COLSTR.Dialog.Dialog> & "[\]] - " & <$COLSTR.Dialog.Title> <$/Row> <$/Table>
This example shows how you can see if a particular column has been defined or not and vary processing if required:
#ifndef COL#.CustomAction.Action #error ^This should be defined :-), Don't know why we got here!^ #endif #ifndef COL#.CustomAction.ExtendedType #error ^We need the "ExtendedType" column of Windows Installer 4.5+.^ #endif