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.
This command takes these parameters:
If you supply the value then it should be one of the valid options for the "@METHOD" parameter of the "Row" command or "Y" to use the current method default.
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 UPDATE="N"> <$/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>
This is an example where you wish to update an existing row:
;---------------------------------------------------------------------------- ;--- Tell user what to do if they get a permissions issue ------------------- ;---------------------------------------------------------------------------- <$Table "Error"> ;--- Error 1303. The installer has insufficient privileges to access this directory: C:\ProgramData\Microsoft\Event Viewer\Views\ANZ. The installation cannot continue. Log on as administrator or contact your system administrator. --- <$Row @Where="Error = 1303" @OK=^? = 1^ @Code="Y"> ;--- Work out the text to append ---------------------------------- dim T3103 : T3103 = vbCRLF & vbCRLF & _ "Please see http://help.co/permissions for more information." ;--- The above is literal text (overkill for this example) -------- T3103 = replace(T3103, "]", vbTAB) ;;Hide the right bracket T3103 = replace(T3103, "[", "[\[]") ;;Take care of "[" T3103 = replace(T3103, vbTAB, "[\]]") ;;Take care of "]" ;--- Append the text to the existing value ------------------------ <$COLSTR.Error.Message> = <$COLSTR.Error.Message> & T3103 <$/Row UPDATE="UPDATE"> <$/Table>