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]: Row[Next]: RowsDelete
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Source Code->Commands->/Row

The "/Row" Command

This command is normally called automatically by the "Row" command and so is rarely needed. It is used to delimit the user VBSCRIPT which is being used to process a record when the "@CODE='Y'" parameter was used.

EXAMPLE

The standard "bannrbmp" is a white bar with a graphic image on the right. To make it more managable I wish to split the image into two bitmaps, the first a very small "white" image which gets scaled to fill the area and a fixed size "icon" image.

The simplest method is to replace the "bannrbmp" binary and leave the "Control" table entries alone. If I did nothing else I would now have a plain white bar only on each dialog.

To add the "icon", I need to create a new record for every dialog making use of the "bannrbmp" graphic in the "Control" table. I do not wish to hard code all the values over multiple "Row" commands.

Splitting the bitmap into a scalable white bitmap allowed me to fill the area (pretty much impossible any other way) while also preventing the graphic from being resized.

;--- Insert the binaries ----------------------------------------------------
<$Binary ".\white.bmp"   KEY="bannrbmp"    DOCO="N">   ;;Very small image gets sized to fill area
<$Binary ".\Aust_DB.bmp" KEY="AUST_DB.BMP" DOCO="N">   ;;Will place fixed size bitmap on right of filled area

;--- Now create new record(s) -----------------------------------------------
<$Table "Control">
   <$Row @Where="`Control` = 'BannerBitmap'" @Code='Y' @OK=^? > 0^>
       ;--- Insert a new record (grabbing info from the located record) -----
       dim oRecNew : set oRecNew = oRec
       oRecNew.StringData(2)  = "CompanyLogo"
       oRecNew.IntegerData(4) = 330
       oRecNew.IntegerData(5) = 10
       oRecNew.IntegerData(6) = 26
       oRecNew.IntegerData(7) = 26
       oRecNew.IntegerData(8) = &H00100000 or 1    ;;Fixed size bitmap
       oRecNew.StringData(10) = "AUST_DB.BMP"
       oRecNew.StringData(11) = ""

       ;--- INSERT ----------------------------------------------------------
       oView.Modify MsiViewModifyInsert, oRecNew
       VbsCheck "Creating and inserting 'AUST_DB.BMP' record."
   <$/Row>
<$/Table>

The above table inserts can now also be done like:

<$Table "Control">
#(
   <$Row
        @Where="`Control` = 'BannerBitmap'"
       @Method="INSERT"
           @OK=^? > 0^
       Control="CompanyLogo"
             X="330"
             Y="10"
         Width="26"
        Height="26"
    Attributes="&H00100001"            ;;Fixed size bitmap
          Text="AUST_DB.BMP"
  Control_Next=""
   >
#)
<$/Table>


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: Row[Next]: RowsDelete


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Sunday August 13 2017 at 2:39pm
Visit MAKEMSI's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.