PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: Wise Installer OLE Automation[Next]: The Header File - WISEINST.WIH

The Header File - BSD.WIH

This is the header file is a front end to my WISEINST.WIH header file.

This header is used to apply (and enforce) my organisation's standards on the built packages as well as simplifying the package generation process.

This is an extremely powerful tool which eliminates the need for using the Wise Installer wizard when creating installation packages, for more information and examples on how some packages might look have a look at "Wise Installer OLE Automation".

The header file is not documented so for that reason only a person writing a script would need to refer to the file. If interest in this facility is shown I may add documentation.

    ;----------------------------------------------------------------------------
    ;
    ;    MODULE NAME:   BSD.WIH
    ;
    ;        $Author:   USER "Dennis"  $
    ;      $Revision:   1.8  $
    ;          $Date:   30 May 2001 17:29:42  $
    ;       $Logfile:   C:/DBAREIS/Projects.PVCS/PpwAddOn/WiseInst/bsd.wih.pvcs  $
    ;
    ;    DESCRIPTION:   A BSD (Branch Systems Development) specific
    ;                   setup for how we create packages.
    ;                   It provides a "front end" for the "WISEINST.WIH"
    ;                   package.
    ;
    ;                   This header starts the package definition and presets
    ;                   some ANX WIN2000 specific standards/requirements such
    ;                   as AUTOMATIC install (while this is being done
    ;                   "incorrectly" it is the standard).
    ;
    ;                   Note that current version number and change descriptions
    ;                   as well as a product name/description is read from a
    ;                   ".VER" file with the same basename and path as the
    ;                   "root" ".WI" file.
    ;
    ;                   The VER file contains a history of all releases with the
    ;                   current first and the current change details are saved
    ;                   as a property in the WSI/MSI file. This could be
    ;                   extracted for HTML reports etc. The ".VER" file has
    ;                   enough details that a HTML report could also be run
    ;                   against it when/if required.
    ;
    ;                   Do NOT touch this file it is included by your script!
    ;----------------------------------------------------------------------------
    
    
    ;--- Must only be included once! --------------------------------------------
    #ifdef  BSD_VERSION
            #error  "This header file has already been included!"
    #endif
    #define BSD_VERSION   01.150
    
    ;--- Some WISEINST defaults -------------------------------------------------
    #define?  SCT_DEFAULT        <$SCT_ADVERTISED>
    
    ;--- Define some Constants --------------------------------------------------
    #evaluate CurrentDir             ^directory()^
    #define?  BsdHomePage            http://www.anz/intranet/bsd/bsd_home.htm
    #define?  BsdContactName         Damien Brown (Manager)
    #define?  BsdContactNamePh       (03)8615-5252
    #define?  BsdManufacturer        Branch Systems Development
    #define?  BsdManufacturerDetail  Developed by                    \
                                     Branch Systems Development      \
                                     (ANX Australia, 2/570 Bourke St, Melbourne).
    #define   BsdIDriveSetupShortDirText \
              I Drive Setup
    
    
    ;--- Extra BSD defined "Properties" -----------------------------------------
    #define   BSDPROP_PREFIX            __BSD_
    #define   WISEINST_PROP_PREFIX      <$BSDPROP_PREFIX>WI_
    #define   BSDPROP_LAST_CHANGE_DESC  <$BSDPROP_PREFIX>LastChange
    #define   BSDPROP_BUILT_WSI         <$BSDPROP_PREFIX>BuiltWsi
    #define   BSDPROP_BUILT_WSI_TIME    <$BSDPROP_PREFIX>BuiltWsiAt
    #define   BSDPROP_BUILT_VB_TIME     <$BSDPROP_PREFIX>BuiltScriptAt
    #define   BSDPROP_PACKAGE_SRC_WI    <$BSDPROP_PREFIX>BuildWi
    #define   BSDPROP_BUILD_CNAME       <$BSDPROP_PREFIX>BuildPcName
    #define   BSDPROP_BUILD_BSB         <$BSDPROP_PREFIX>BuildDeptBSB
    #define   BSDPROP_BUILD_COST_CENTER <$BSDPROP_PREFIX>BuildDeptCostCentre
    #define   BSDPROP_IN_DEBUG_MODE     <$BSDPROP_PREFIX>BuiltInDebugMode
    
    
    ;--- Any defined messages a user might see ----------------------------------
    #define? MSG_MUST_BE_WIN2000                           \
             Branch Systems Development applications       \
             are only intended for use on Windows 2000!    \
             Contact BSD for more information.
    
    
    ;--- In case user does not want a VER file define these variables here ------
    #DefineRexx ''
                ;--- Init variables that may be contained in the file -----------
                VER_DESCRIPTION = '';
                VER_ProductName = '';
                VER1_MAJ_MIN    = '';
                VER1_VERSION    = '';
                VER1_CHANGES    = '';
    #DefineRexx
    
    ;--- The default is a ".VER" file MUST exist --------------------------------
    #ifndef     BSD_NO_VER_FILE_EXISTS
       ;--- Look for PACKAGE Description/Version File ---------------------------
       #DefineRexx ''
                ;--- Work out the filename of the VER file (if it exists) -------
                PackageNameS = _filespec('withoutextn', '<?InputFile>') || '.ver'
    
                ;--- Read the contents ------------------------------------------
                PackageName = stream(PackageNameS, 'c', 'query exists');
                if PackageName = '' then
                   error('Could not find the version file:', '  ' || PackageNameS);
                else
                do
                   ;--- Read the leading "comment" lines (look for keywords) ----
                   call AddInputFileToDependancyList PackageName;
                   LastVar = '';
                   CloseRc = stream(PackageName, 'c', 'close');
                   do  while lines(PackageName) <> 0
                       ;--- Read the next line (stop if at end of leading comments) ---
                       OneLine = strip(linein(PackageName));
                       if  OneLine <> '' & left(OneLine, 1) <> ';' then
                           leave;
    
                       ;--- Any "heading" line containing equal sign is property ---
                       OneLine = substr(OneLine, 2);
                       if  pos('=', OneLine) <> 0 then
                       do
                           ;--- Split up ----------------------------------------
                           parse var OneLine KeyWord '=' Value;
                           KeyWord = strip(KeyWord);
    
                           ;--- Don't want leading or trailing whitespace on Value ---
                           Value = strip(Value);
    
                           ;--- Work out what variable (is continued line?) -----
                           if  KeyWord <> '' then
                               LastVar = KeyWord;      ;;Not continued, remember variable
                           else
                           do
                               ;--- Have a continued line (append values) -------
                               KeyWord = LastVar;      ;;Use last seen variable name
                               KeyVar  = 'VER_' || KeyWord;
                               Value   = value(KeyVar) || ' ' || Value;
                           end;
    
                           ;--- Update keyword's variable -----------------------
                           KeyVar = 'VER_' || KeyWord;
                           call value KeyVar, Value;
                       end;
                   end;
                   call DieIfIoErrorOccurred PackageName;
                   CloseRc = stream(PackageName, 'c', 'close');
                end;
       #DefineRexx
    
       ;--- The header should have contained a product name ---------------------
       #if [VER_PRODUCTNAME = '']
           #error 'No PRODUCTNAME was found in the VER file'
       #elseif
           ;--- Update the product name -----------------------------------------
           #define ProductName <??VER_PRODUCTNAME>
       #endif
    
       ;--- The header should have contained a product description --------------
       #if [VER_DESCRIPTION = '']
           #error 'No DESCRIPTION was found in the VER file'
       #elseif
           ;--- Can get comments from the VER file ------------------------------
           #define ProductComments <??VER_DESCRIPTION>
       #endif
    
       ;--- Define code to handle first record and then abort #import -----------
       #DefineRexx 'ML_RECORD_FILTER'
           ;--- Remember the details --------------------------------------------
           parse var Column.2 YY '.' DDD
           if length(YY) <> 2 | length(DDD) <> 3 then
           do
               error('The version number "' || Column.2 || '" from "' || PackageName || '" is not in the BSD "YY.DDD" format');
           end;
           VER1_MAJ_MIN = Column.1;
           VER1_VERSION = Column.2;
           VER1_CHANGES = Column.3;
    
           ;--- Stop importing --------------------------------------------------
           Remove = 'EOF: Only want the first version record!';
       #DefineRexx
    
       ;--- Import the first record ---------------------------------------------
       #define ML_DELIMITER        :
       #define ML_SEPARATOR        <?xCRLF>
       #define ML_PROTECT_START
       #define ML_PROTECT_END
       #define ML_BEFORE
       #define ML_AFTER
       #define ML_HEADER
       #define ML_RECORD
       #define ML_DO_PASS_2         N
       #define ML_STRIP_LEADING     N
       #import    "<??PackageName>" ML ""             \
                   "{*,Maj_Min,REQUIRED,NONBLANK}?"   \
                   "{*,Version,REQUIRED,NONBLANK}?"   \
                   "{*,Changes,REQUIRED,NONBLANK}?"
    
       ;--- Pick Up imported information ----------------------------------------
       #if [VER1_VERSION = '']
           #error 'No BSD VERSION record was found in the VER file'
       #elseif
           #define BsdVersion <??VER1_VERSION>
       #endif
       #if [VER1_MAJ_MIN = '']
           #error 'No Product Major/Minor information was found in the VER file'
       #elseif
           #define MajMinVersion <??VER1_MAJ_MIN>
       #endif
    #endif
    
    ;--- Handle the version number ----------------------------------------------
    #ifndef    BsdVersion
               ;--- None supplied so use Todays Date in format "YY.DDD" ---------
               #evaluate  BsdVersion  ^substr(date('S'),3,2) || right(date('D'), 3, '0')^
    #endif
    #define    ProductVersion  <$BsdVersion>
    #ifndef    MajMinVersion
               ;--- None supplied assume none required --------------------------
               #define MajMinVersion 1.00
    #endif
    #ifndef    AisStandardsVersion       ;;Handle any exceptions to normal rules
       #NextId
       #DefineRexx ''
           ;--- Split up version and recombine to create ANX formatted version --
           @@MajMinVersion = '<$MajMinVersion>';
           @@BsdVersion    = '<$BsdVersion>';
           parse var @@MajMinVersion @@Maj '.' @@Min;
           parse var @@BsdVersion    @@YY '.' @@DDD;
           if length(@@YY) <> 2 | length(@@DDD) <> 3 then
           do
               ;--- User supplied format was not correct ------------------------
               error('The version number "' || @@Version || '" is not formatted correctly', 'Expected "YY.DDD"!');
           end;
           else
           do
               ;--- Format OK so now combine bits in acceptable "ANX " version --
               @@MajW2  = right(@@Maj, 2, '0');
               @@Maj    = @@Maj + 0;                            ;;Strip leading zeros
               @@Min    = right(@@Min, 2, '0');                 ;;Minor version must be 2 digits
               @@Bld    = right(@@YY, 1) || @@DDD;              ;;4 digit build number
               @@AnzFmt = @@MajW2 || '.' || @@Min || '.' || @@Bld || '.0101';  ;;Now In Ais format (all releases are "major" updates - ignore version number!)
               call MacroSet 'AisStandardsVersion', @@AnzFmt;
    
               ;--- If overrideing this process user must also set these --------
               call MacroSet "MajVersionW2", @@MajW2;  ;;Padded to 2 digits (example "01")
               call MacroSet "MajVersion",   @@Maj;    ;;Minimum required digits (no leading zeros)
               call MacroSet "MinVersion",   @@Min;    ;;Padded to 2 chars
               call MacroSet "BldVersion",   @@Bld;    ;;Exactly 4 digits
           end;
       #DefineRexx
    #endif
    
    ;--- Make sure user set up required variables -------------------------------
    #ifndef    ProductName
               #error ^You must identify the product using "ProductName"^
    #endif
    
    
    ;--- Handle some optional variables -----------------------------------------
    #ifndef    ProductAuthor
               ;--- By default use users PVCS ID --------------------------------
               #evaluate  ProductAuthor  ^getenv("vcsid", "Y")^
    #endif
    
    ;--- Work out the WSI/MSI filenames to be used (user has no say in name) ----
    #define? BSD_PRODUCTNAME_PREFIX     ANX      ;;ANX standard
    #NextId
    #DefineRexx ''
       ;--- Remove spaces and first letter each work is upper case --------------
       @@Words   = '<$ProductName>';
       @@NewName = '';
       do  @@I = 1 to words(@@Words)
           ;--- Get the next word -----------------------------------------------
           @@Word = word(@@Words, @@I);
    
           ;--- Make sure first letter only is upper case -----------------------
           @@First = translate(left(@@Word, 1));
           @@Rest  = translate(substr(@@Word, 2), xrange('a', 'z'), xrange('A', 'Z'));
    
           ;--- Add to existing words -------------------------------------------
           @@NewName = @@NewName || @@First || @@Rest;
       end;
    
       ;--- Now users don't want "ANXAnz"... ------------------------------------
       @@PreFix = translate('<$BSD_PRODUCTNAME_PREFIX>');
       if @@PreFix = translate(left(@@NewName, length(@@PreFix))) then
       @@NewName = substr(@@NewName, length(@@PreFix)+1);
    
       ;--- NetDeploy requirement -----------------------------------------------
       call MacroSet 'BSD_NETDEPLOY_PRODUCTNAME_PROPERTY', @@NewName;
    #DefineRexx
    #define? BSD_BASE_FILENAME         <$BSD_PRODUCTNAME_PREFIX><??@@NewName><$AisStandardsVersion>
    #define? BSD_AIS_STD_PGM_DIRNAME   <??@@NewName> <$MajVersion>   ;;Meets AIS standards (life wasn't meant to be easy...)
    #define? GENERATE                  <$CurrentDir>\out\<$BSD_BASE_FILENAME>
    #define? BSD_COMPLETE_FEATURE_NAME Complete                        ;;Make AIS happy...
    ;;#define? BSD_COMPLETE_FEATURE_NAME <??@@NewName><$BsdVersion>    ;;If "too long" validation fails
    #define? DEFAULT_FEATURE           <$BSD_COMPLETE_FEATURE_NAME>    ;;Set up for WISEINST.WIH
    
    ;--- AIS Don't like (so leave at "Complete" for now) ------------------------
    #define+ DEFAULT_FEATURE           Complete
    
    ;--- Make AIS even more happy -----------------------------------------------
    #define WISEINST_GENERATOR_TEXT  PPWIZARD v<?Version>, a free tool - See BSD Group for more details
    
    
    ;--- Put BSD homepage into HTML report --------------------------------------
    #define WISEINST_HTMLRPT_FOOTER_UNDER_TIME                        \
            <BR>                                                     -\
            <a href="http://www.anz/intranet/bsd/bsd_home.htm"        \
               title="<$BsdManufacturerDetail>"                       \
               target="_blank"                                       -\
            >                                                        -\
               BSD Homepage                                          -\
            </a>
    
    ;--- Comments for HTML report -----------------------------------------------
    #define WISEINST_HTMLRPT_UNDER_TITLE  \
            <$BSD_HTMLRPT_COMMENT>       -\
            <$BSD_HTMLRPT_ISSUES>
    #option  PUSH DefineMacroReplace=ON
    #define? BSD_HTMLRPT_COMMENT   \
             <P><$ProductComments>
    #option  POP
    #define? BSD_HTMLRPT_ISSUES    \
             <P>There are no known issues or exceptions from AIS standards.
    
    ;--- Create a batch file which can be called to access filename of MSI etc --
    #NextId
    #DefineRexx ''
       ;--- Generate the batch file (same name as "package" in out dir) ---------
       WSIMSI_S  = _filespec('name', '<$GENERATE>');
       BatchFile = '<$CurrentDir>\out\' || _filespec('withoutextn', _filespec('name', '<?InputFile>')) || '.cmd';
       call MustDeleteFile BatchFile;
       call lineout BatchFile, "@echo off"
       call lineout BatchFile, "@REM --- Auto created by BSD.WIH to allow you to access generated file name! ---"
       call lineout BatchFile, "@set WSIMSI_NP=" || WSIMSI_S
       call lineout BatchFile, "@set  WSIMSI_P=<$GENERATE>"
       call DieIfIoErrorOccurred BatchFile;
       CloseRc = stream(BatchFile, 'c', 'close');
       call AddOutputFileToDependancyList BatchFile;
    #DefineRexx
    
    
    ;--- Specify default location for environment variables ---------------------
    ;#define? ENV_DEFAULT_COMPONENT <$Complete>
    
    ;--- Some handy debug things ------------------------------------------------
    #define? VERBOSE_OUTPUT    Y               ;;Display heaps of info by default
    #option  PUSH DefineMacroReplace=ON
    #ifndef    BSD_DEBUG
               ;--- Not in debug mode -------------------------------------------
               #define BSD_DEBUG_MODE No
               #define ProductNameDbg <$ProductName>
    #elseif
               ;--- In Debug Mode -----------------------------------------------
               #define BSD_DEBUG_MODE Yes
    
               ;--- Make it easier to uninstall (no scrolling through list)! ----
               #define+ ProductNameDbg AAA_DEBUG - <$ProductName>
    
               ;--- Set "WISEINST.WIH" debug modes ------------------------------
               #define DEBUG_OUTPUT
    #endif
    #option  POP
    
    ;--- BSD Default (override WISEINST) ----------------------------------------
    #define? FATTR_DEFAULT     <$FATTR_ADVERTISING_NONE>+<$FATTR_REQUIRED_FEATURE>
    
    ;--- Include PPWIZARD WISE INSTALLER OLE AUTOMATION support -----------------
    #include "WISEINST.WIH"
    
    
    ;--- Handle Product comments (visible in Explorer & UNINSTALL) --------------
    #option  PUSH DefineMacroReplace=ON
       #ifndef      ProductComments
           ;--- Create 2 paragraphs (no user comment) ---------------------------
           #define  ProductComments                                            \
                    <$ProductName> v<$BsdVersion>                             -\
                    <?xCRLF>                                                  -\
                    Created <?CompileTime>                                    -\
                    <?xCRLF><?xCRLF>                                          -\
                    <$BsdManufacturerDetail>
       #elseif
           ;--- Create 3 paragraphs (include user comment)-----------------------
           #define+ ProductComments                                            \
                    <$ProductName> v<$BsdVersion>                             -\
                    <?xCRLF>                                                  -\
                    Created <?CompileTime>                                    -\
                    <?xCRLF><?xCRLF>                                          -\
                    <$ProductComments><?xCRLF><?xCRLF>                        -\
                    <$BsdManufacturerDetail>
       #endif
       #ifdef    BSD_DEBUG
           ;--- "MARK" as produced in debug mode --------------------------------
           #define+ ProductComments                             \
                    *** GENERATED IN DEBUG MODE ***<?xCRLF>    -\
                    <$ProductComments>
       #endif
    #option  POP
    
    
    ;--- Start Install Package --------------------------------------------------
    <$Package>
    
    ;--- Automatically do end of package processing at end of user input --------
    #define? BSD_EXTRA_VB_CODE_AT_END          ;;By default no extra code
    #define  _EndOfBsdPackage              \   ;;All logic for end of script
             <$SRCLINE 'Processing "_EndOfBsdPackage" macro'> -\
             <?NewLine><?NewLine>                             %\
             '=========================================================================== %\
             '=== End of User stuff, Start of BSD Trailer =============================== %\
             '=========================================================================== %\
             <$/Package>                                      %\
             <$SRCLINE 'Processing "_EndOfBsdPackage" macro'> -\
             <$BSD_EXTRA_VB_CODE_AT_END>
    #OnExit  <$_EndOfBsdPackage>               ;;Register action for end of build
    
    
    ;--- Set some properties ----------------------------------------------------
    <$SetProperty NAME="ProductName"       VALUE="<$ProductNameDbg> <$BsdVersion>"> ;;This is what gets displayed on add remove programs
    <$SetProperty NAME="ProductVersion"    VALUE="<$AisStandardsVersion>">
    <$SetProperty NAME="Author"            VALUE="<$ProductAuthor>">
    <$SetProperty NAME="Manufacturer"      VALUE=^<$BsdManufacturer>^>
    <$SetProperty NAME="_WiseDialogSuffix" VALUE=^Installation (Version <$BsdVersion>)^>
    
    ;--- Set the UpgradeCode GUID (must be constant!) ---------------------------
    #ifndef BSD_UPGRADE_CODE
       ;--- Load GUID support ---------------------------------------------------
       #ifndef NEEDGUID_VERSION
           ;--- Not yet loaded! -------------------------------------------------
           #if FindFile("NEEDGUID.H") = ''
               #error ^Could not find "NEEDGUID.H".{NL}This is a free PPWIZARD add-on (see <?PpwizardHomePage>)^
           #endif
           #include "NEEDGUID.H"
       #endif
    
       ;--- As user did not supply one generate a FIXED GUID for ProductCode ----
       #evaluate ^GUIDID_UPGRADE_CODE^ ^ReplaceString('UPGDCODE-<$ProductName $$SQx2>', ' ', '_')^
       <$GuidGet Define=^BSD_UPGRADE_CODE^ ALIAS=~<$GUIDID_UPGRADE_CODE>~ COMMENT=~Upgrade Code GUID for '<$ProductName>' (Must remain constant!)~>
    #endif
    <$SetProperty NAME="UpgradeCode"  VALUE=^<$BSD_UPGRADE_CODE>^>
    
    ;--- All versions are MAJOR UPDATES (should eliminate many errors) ----------
    <$TABLE "InstallExecuteSequence">
       <$Row "RemoveExistingProducts" Sequence="1450">   ;;Want any existing version removed first!
    <$/TABLE>
    <$TABLE "Upgrade">
       #(
          <$Row
               UpgradeCode=^<$BSD_UPGRADE_CODE>^
                Attributes="0"
                ActionProperty="ANY"
          >
       #)
    <$/TABLE>
    
    
    ;--- Record details about THIS header file ----------------------------------
    <$RecordDetailsAboutThisHeaderFile VERSION=^<$BSD_VERSION>^>
    
    ;--- AIS require BSB & Cost Center Information ------------------------------
    #define?      PACKAGE_BSB                 3060
    #define?      PACKAGE_COST_CENTER          884
    <$SetProperty NAME="<$BSDPROP_BUILD_BSB>"         VALUE=^<$PACKAGE_BSB>^>
    <$SetProperty NAME="<$BSDPROP_BUILD_COST_CENTER>" VALUE=^<$PACKAGE_COST_CENTER>^>
    
    ;--- Set some BSD defined properties ----------------------------------------
    #evaluate ^^  ^COMPUTERNAME = getenv("COMPUTERNAME", "Y")^
    <$SetProperty NAME="<$BSDPROP_BUILD_CNAME>"    VALUE=^<??COMPUTERNAME>^>
    <$SetProperty NAME="<$BSDPROP_BUILT_WSI>"      VALUE=^<$GENERATE>.WSI^>
    <$SetProperty NAME="<$BSDPROP_BUILT_WSI_TIME>" VALUE=^<$VbImbed STAT=~VbMadeTime~>^>
    <$SetProperty NAME="<$BSDPROP_BUILT_VB_TIME>"  VALUE=^<?CompileTime>^>
    <$SetProperty NAME="<$BSDPROP_PACKAGE_SRC_WI>" VALUE=^<?InputFile>^>
    <$SetProperty NAME="<$BSDPROP_IN_DEBUG_MODE>"  VALUE=^<$BSD_DEBUG_MODE>^>
    #if ['<??VER1_CHANGES>' <> '']
        ;--- Version number was found within the version file -------------------
        <$SetProperty NAME="<$BSDPROP_LAST_CHANGE_DESC>"  VALUE=^<??VER1_CHANGES>^>
    #endif
    
    
    ;--- Does not work? ---------------------------------------------------------
    ;<$SetProperty NAME="LOGACTION"       VALUE=^CreateShortcuts^>
    
    ;--- Set up keywords for this MSI -------------------------------------------
    #define? BSD_KEYWORDS_STANDARD  BSD, PPWIZARD      ;;Allow user to set keywords
    #define? BSD_KEYWORDS_EXTRA
    #NextId
    #RexxVar @@KwS =  '<$BSD_KEYWORDS_STANDARD>'
    #RexxVar @@KwE =  '<$BSD_KEYWORDS_EXTRA>'
    #DefineRexx ''
       if  @@KwE = '' then
           MsiKeywords = @@KwS;
       else
           MsiKeywords = @@KwS || ', ' || @@KwE;
    #DefineRexx
    
    ;--- Set some SUMMARY items (modify existing records) -----------------------
    <$TABLE "Summary">
            <$Row "Author"    Value="<$ProductAuthor>">
            <$Row "Comments"  Value="<$ProductComments>">
            <$Row "Title"     Value="<$ProductNameDbg> <$MajVersion>">
            <$Row "Key Words" Value="<??MsiKeywords>">
            <$Row "Subject"  Value="WARNING! This WSI/MSI was autogenerated by BSD group. Do NOT modify! Provide feedback to BSD group if changes are required.">
    
            ;--- Wise bug? Doesn't work. Field name OK as per MSI doco! ---------
    ;;;     <$Row Field="Creating Application"  Value="Created with PPWIZARD (Free tool! See <?PpwizardHomePage>)">
    <$/TABLE>
    
    
    ;--- Set some "AIS W2K standard" properties ---------------------------------
    #define  UNINSTALL_INSTALL_DATETIME      ;;does not seem to work (disable for now)
    #define? UNINSTALL_INSTALL_DATETIME      <?xCRLF><?xCRLF>Installed at [Date], [Time].
    #define? BSD_ALLUSERS                    ;;Don't set by default
    ;<$SetProperty NAME="InstallChoice"       VALUE=^AR^>
    ;<$SetProperty NAME="UIReinstallMode"     VALUE=^ro^>
    <$SetProperty NAME="ARPCONTACT"          VALUE=^<$BsdContactName>^>
    <$SetProperty NAME="ARPHELPLINK"         VALUE=^<$BsdHomePage>^>
    <$SetProperty NAME="ARPHELPTELEPHONE"    VALUE=^<$BsdContactNamePh>^>
    <$SetProperty NAME="ARPURLINFOABOUT"     VALUE=^<$BsdHomePage>^>
    <$SetProperty NAME="ARPCOMMENTS"         VALUE=^<$ProductComments><$UNINSTALL_INSTALL_DATETIME>^>
    <$SetProperty NAME="ROOTDRIVE"           VALUE=^C:\^>
    <$SetProperty NAME="REBOOT"              VALUE=^ReallySuppress^>
    <$SetProperty NAME="ARPNOMODIFY"         VALUE=^1^>
    
    ;--- Set All Users? (Note forget doco etc Missing ALLUSERS is NOT = 0) ------
    #if  ['<$BSD_ALLUSERS>' = 1]
         <$SetProperty NAME="ALLUSERS" VALUE=^<$BSD_ALLUSERS>^>
    #endif
    
    
    ;--- Update default feature -------------------------------------------------
    #define? BSD_COMPLETE_FEATURE_DIR                    ;;default to none
    #evaluate+ ^BitsCombined^ ^<$FATTR_DEFAULT>^
    
    <$TABLE "Feature">
       #(
           <$Row "Complete"
                  ;--- Possibly update feature Name (will see in Event logs) ----
    ;;AisDon'tLike  Feature=^<$BSD_COMPLETE_FEATURE_NAME>^
    
                  ;--- Set feature attributes to default or user selected -------
                  Attributes="<$BitsCombined>"
    
                  ;--- Set main directory ---------------------------------------
                  Directory_="<$BSD_COMPLETE_FEATURE_DIR>"
    
                  ;--- Add comment to feature -----------------------------------
              ;;; Description="<$ProductComments>"   ;;ICE03 too long (some products)
                  Description=^<$ProductName> v<$BsdVersion>      -\
                               <?xCRLF>                           -\
                               Created <?CompileTime>             -\
                               <?xCRLF><?xCRLF>                   -\
                               <$BsdManufacturerDetail>           -\
                              ^
           >
       #)
    <$/TABLE>
    
    
    ;--- Do not install on DOS versions of Windows or NT ------------------------
    <$TABLE "LaunchCondition">
       <$Row Condition="NOT VersionNT OR (VersionNT >= 500)" Description="<$MSG_MUST_BE_WIN2000>">
    <$/TABLE>
    
    
    ;--- Disable dialogs (unless user wants to keep) ----------------------------
    #ifndef BSD_KEEP_USER_DIALOGS
       ;--- Only keep progress dialog (on error/resume dialogs will appear!) ----
       <$TABLE "InstallUISequence">
           <$Row Action="Setup_Dialog"   Condition="1 AND (Installed)"     Sequence="140">
           <$Row Action="Exit_Dialog"    Condition="1 AND (Installed)"     Sequence="-1">
           <$Row Action="Welcome_Dialog" Condition="0 AND (NOT Installed)" Sequence="1230">
           <$Row Action="Patch_Dialog"   Condition="0 AND (PATCH)"         Sequence="1245">
       <$/TABLE>
    #endif
    
    
    ;--- Want ANY standard directories added to Directory table? ----------------
    #ifndef BSD_DONT_CREATE_STD_DIRS
       ;--- All BSD programs should go into "Program files\ANX\*" ---------------
       #ifndef BSD_DONT_CREATE_DIR_ProgramFilesBSD
           ;--- User did not say NOT to create ----------------------------------
           <$Directory Name="DIR_ProgramFilesBSD"  Parent="ProgramFilesFolder" SubDir="ANX">
       #endif
    
       ;--- Define SSP Standard Location for "Business Applications" ------------
       #ifndef BSD_DONT_CREATE_SCDIR_BUSAPPS
           ;--- User did not say NOT to create ----------------------------------
           <$Directory Name="SCDIR_BUSAPPS"  Parent="ProgramMenuFolder" SubDir="Business Applications">
       #endif
    
       ;--- Allow icons to be placed into the Launch bar (TaskBar) --------------
       #ifdef BSD_WANT_SCDIR_TASKBAR_CU
           ;--- User wants to add to CURRENT User TaskBar -----------------------
           <$Directory Name="ZCUtb1"           Parent="AppDataFolder" SubDir="Microsoft">
           <$Directory Name="ZCUtb2"           Parent="ZCUtb1"        SubDir="Internet Explorer">
           <$Directory Name="SCDIR_TASKBAR_CU" Parent="ZCUtb2"        SubDir="Quick Launch">  ;;Current User
       #endif
       #ifdef BSD_WANT_SCDIR_TASKBAR_AU
           ;--- User wants to add to ALL Users TaskBar --------------------------
           <$Directory Name="ZAUtb1"           Parent="AppDataFolder" SubDir="Microsoft">
           <$Directory Name="ZAUtb2"           Parent="ZAUtb1"        SubDir="Internet Explorer">
           <$Directory Name="SCDIR_TASKBAR_AU" Parent="ZAUtb2"        SubDir="Quick Launch">  ;;All Users
       #endif
    #endif
    
    
    ;--- Fix Wise BUG (incorrect use of "Enabled" bit in control table on GroupBoxes) ---
    <$TABLE "Control">
       ;--- Wise sets "3" (enabled+visible) -------------------------------------
       <$Row "Select_Feature_Dialog,LocationFrame"  Attributes="1">
       <$Row "Select_Feature_Dialog,SelectionFrame" Attributes="1">
       <$Row "Single_Feature_Destination,GroupBox"  Attributes="1">
    <$/TABLE>
    
    
    
    ;--- Set UNINSTALL (add-remove) ICON ----------------------------------------
    #define?  BSD_PRODUCT_ICON  bsd.ico    ;;Allow user to choose an alternative icon
    #NextId
    #DefineRexx ''
       ;--- Find "BSD.ICO" (or user chosen) icon --------------------------------
       @@IcoFile = FindFile("<$BSD_PRODUCT_ICON>");
       if  @@IcoFile = '' then
       do
           error('Could not locate the product bitmap "<$BSD_PRODUCT_ICON>"!');
       end;
    #DefineRexx
    <$AddIcon  FILE="<??@@IcoFile>"  KEY="PRODUCT_ICON.EXE">
    
    ;--- "Improve" some dialogs -------------------------------------------------
    #define?  BSD_PRODUCT_BMP  bsd3232.bmp    ;;Allow user to choose an alternative bitmap
    #NextId
    #DefineRexx ''
       ;--- Find Bitmap ---------------------------------------------------------
       @@BmpFile = FindFile("<$BSD_PRODUCT_BMP>");
       if  @@BmpFile = '' then
       do
           error('Could not locate the uninstall icon "<$BSD_PRODUCT_ICON>"!');
       end;
    #DefineRexx
    <$AddBinary  FILE="<??@@BmpFile>"  KEY="BSD_PRODUCT.BMP">
    <$TABLE "Control">
    #(
        <$Row "Maintenance_Welcome_Dialog,Bitmap25"
                       X="288"
                       Y="0"
                   Width="87"
                  Height="42"
              Attributes="1048577"
                    Text="BSD_PRODUCT.BMP"
        >
    #)
    #(
        <$Row "Admin_Install_Point,Bitmap21"
                       X="309"
                       Y="0"
                   Width="66"
                  Height="44"
              Attributes="1048577"
                    Text="BSD_PRODUCT.BMP"
        >
    #)
    #(
        <$Row "ErrorDialog,Picture"
                       X="8"
                       Y="10"
                   Width="36"
                  Height="30"
              Attributes="1048577"
                    Text="BSD_PRODUCT.BMP"
        >
    #)
    #(
        <$Row "FilesInUse,Bitmap62"
                       X="275"
                       Y="0"
                   Width="100"
                  Height="43"
              Attributes="1048577"
                    Text="BSD_PRODUCT.BMP"
        >
    #)
    #(
        <$Row "Progress_Dialog,Bitmap26"
                       X="299"
                       Y="0"
                   Width="74"
                  Height="43"
              Attributes="1048577"
                    Text="BSD_PRODUCT.BMP"
        >
    #)
    #(
        <$Row "Installation_Type_Dialog,Bitmap23"
                       X="306"
                       Y="0"
                   Width="69"
                  Height="43"
              Attributes="1048577"
                    Text="BSD_PRODUCT.BMP"
        >
    #)
    #(
        <$Row "User_Information_Dialog,Bitmap30"
                       X="307"
                       Y="0"
                   Width="68"
                  Height="46"
              Attributes="1048577"
                    Text="BSD_PRODUCT.BMP"
        >
    #)
    #(
        <$Row "License_Dialog,Bitmap24"
                       X="306"
                       Y="0"
                   Width="69"
                  Height="43"
              Attributes="1048577"
                    Text="BSD_PRODUCT.BMP"
        >
    #)
    #(
        <$Row "Select_Feature_Dialog,Bitmap28"
                       X="294"
                       Y="0"
                   Width="81"
                  Height="43"
              Attributes="1048577"
                    Text="BSD_PRODUCT.BMP"
        >
    #)
    #(
        <$Row "Admin_Verify_Ready,Bitmap22"
                       X="304"
                       Y="0"
                   Width="71"
                  Height="44"
              Attributes="1048577"
                    Text="BSD_PRODUCT.BMP"
        >
    #)
    #(
        <$Row "Start_Installation_Dialog,Bitmap29"
                       X="294"
                       Y="0"
                   Width="81"
                  Height="44"
              Attributes="1048577"
                    Text="BSD_PRODUCT.BMP"
        >
    #)
    #(
        <$Row "Readme_Dialog,Bitmap23"
                       X="291"
                       Y="0"
                   Width="84"
                  Height="43"
              Attributes="1048577"
                    Text="BSD_PRODUCT.BMP"
        >
    #)
    #(
        <$Row "Single_Feature_Destination,Bitmap23"
                       X="306"
                       Y="0"
                   Width="69"
                  Height="46"
              Attributes="1048577"
                    Text="BSD_PRODUCT.BMP"
        >
    #)
    <$/TABLE>
    
    
    ;--- Adjust for NetDeploy (or more likely ANX processes around it) ----------
    <$SetProperty NAME="Manufacturer" VALUE=^<$BSD_PRODUCTNAME_PREFIX>^>
    <$SetProperty NAME="ProductName"  VALUE="<$BSD_NETDEPLOY_PRODUCTNAME_PROPERTY>">
    
    ;--- Adjust for Wise 3.11.115 _Validation table bug -------------------------
    <$TABLE "_Validation">
       <$Row "Shortcut,ShowCmd" Set="1;3;7">
    <$/TABLE>
    
    
    '============================================================================
    '=== End of BSD Header (Start of User stuff) ================================
    '============================================================================
    <?NewLine>
    <?NewLine>
    <?NewLine>
    <?NewLine>
    


[Top][Contents][Search][Prev]: Wise Installer OLE Automation[Next]: The Header File - WISEINST.WIH

PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Friday June 01 2001 at 5:58pm