MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: Binary[Next]: Compile
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Source Code->Commands->Column

The "Column" Command

Before MAKEMSI can refer to a table it needs to know some information about it. This applies to standard MSI tables or any that you might wish to create for your own uses.

This command defines a single table column for the table definition started by the "TableDefinition" command.

The order of the columns is significant and should match that of the MSI tables being defined. Note that you must follow any MSI restrictions that are in place, for example primary fields must be defined first.

This command takes these parameters:

Note that the above information can be obtained by exporting existing tables with "ORCA" and looking at the first 3 lines (the IDT format is relatively obvious and is poorly documented in "MSI.CHM").

Generated Column Macros

This command creates some macros which make reference to the column easier if you are writing custom VBSCRIPT code, these are:

  1. MACRO: COL#.TableName.ColumnName
    This will expand to an integer representing the columns location within a record (1, 2, ...).

  2. MACRO: COLSTR.TableName.ColumnName
    This will expand to a VBSCRIPT expression which refers to the columns data within a record as a string ("oRec.StringData(2)" etc). The record name can be passed as positional parameter 1 if required but the default of "oRec" is probably what you want.

  3. MACRO: COLINT.TableName.ColumnName
    This will expand to a VBSCRIPT expression which refers to the columns data within a record as an integer ("oRec.IntegerData(2)" etc). The record name can be passed as positional parameter 1 if required but the default of "oRec" is probably what you want.

A simple example follows:

<$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>

EXAMPLE

This example shows the definitions for the standard "Binary" and "File" tables:

<$TableDefinition "Binary">
   <$Column "Name"  TYPE="s72"  KEY="Y">  ;;Max 72 Characters
   <$Column "Data"  TYPE="v0">            ;;Binary field (unlimited length)
<$/TableDefinition>
<$TableDefinition "File">
   <$Column "File"        TYPE="s72"   KEY="Y">
   <$Column "Component_"  TYPE="s72">
   <$Column "FileName"    TYPE="l255">
   <$Column "FileSize"    TYPE="i4">
   <$Column "Version"     TYPE="S72">
   <$Column "Language"    TYPE="S20">
   <$Column "Attributes"  TYPE="I2">
   <$Column "Sequence"    TYPE="i2">
<$/TableDefinition>

;--- Define an internal MAKEMSI table ---------------------------------------
<$TableDefinition "MAKEMSI_FileSource">
   <$Column "File_"       TYPE="s72"   KEY="Y">
   <$Column "SourceFile"  TYPE="s255">
<$/TableDefinition>
<$TableCreate "MAKEMSI_FileSource">
<$Table "_Validation">
#(
   <$Row
            Table="MAKEMSI_FileSource"
           Column="File_"
         Nullable="N"
         KeyTable="File"
        KeyColumn="1"
         Category="Identifier"
      Description="Foreign key into the File table."
   >
#)
#(
   <$Row
            Table="MAKEMSI_FileSource"
           Column="SourceFile"
         Nullable="N"
         Category="Text"
      Description="Full name of source file."
   >
#)
<$/Table>


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006 & 2007 for the Windows SDK (Windows Installer) area.This external link was OK when tested at 12 Jun 2008Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: Binary[Next]: Compile


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Wednesday June 25 2008 at 7:16pm
Visit MAKEMSI's Home PageThis external link was OK when tested at 21 Jun 2008

HTML page dated Mon, 29 Jan 2007 00:11:11 GMT
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006 & 2007 for the Windows SDK (Windows Installer) area.This external link was OK when tested at 12 Jun 2008