\
MAKEMSI Installs...
Available Frameworks
Create New MSI Installers
Preferred MSI Interface for Building a Complete MSI
Department and Company Headers
UISAMPLE.MMH
Automatically included by "COMPANY.MMH"
(logically a part of it),
see "Preferred MSI Interface for Building a Complete MSI"
for more details...
;----------------------------------------------------------------------------
;
; MODULE NAME: UISAMPLE.MMH
;
; $Author: USER "Dennis" $
; $Revision: 1.41 $
; $Date: 06 Jun 2018 18:26:50 $
; $Logfile: D:/DBAREIS/Projects.PVCS/Win32/MakeMsi/uisample.mmh.pvcs $
; COPYRIGHT: (C)opyright Dennis Bareis, Australia, 2003
; All rights reserved.
;
; This header file is only used by "COMPANY.MMH", you may include it yourself
; if you use "uisample.msi" as a template but don't use "COMPANY.MMH" etc.
;
; "COMPANY.MMH" includes this header after all YOUR script has executes for
; these main reasons:
;
; 1. If your script fails your time hasn't been wasted by any atandard
; processing done by this header.
; 2. If you insert dialogs following the UISAMPLE.MSI look and feel they
; can be adjusted exactly the same as occurs for the "standard" ones.
;
; Note that some "UISAMPLE" code was left in "COMPANY.MMH" where its was more
; appropriate that it remain there. This file should really only hold cosmetic
; type "UISAMPLE" changes.
;----------------------------------------------------------------------------
;----------------------------------------------------------------------------
;--- Allow user to disable this completely ----------------------------------
;----------------------------------------------------------------------------
#define? UISAMPLE_DISABLE_COMPLETELY N ;;Y/N
#if ['<$UISAMPLE_DISABLE_COMPLETELY>' <> 'N']
#eof 1
#endif
#NextId
#NextId LOCK "UISAMPLE.MMH"
;----------------------------------------------------------------------------
;--- Allow user to insert dialogs etc WITH ORIGINAL Look and feel -----------
;----------------------------------------------------------------------------
#define? UISAMPLE_BEFORE_ANYTHING_DONE
<$UISAMPLE_BEFORE_ANYTHING_DONE>
;----------------------------------------------------------------------------
;--- Remove "Typical" button? -----------------------------------------------
;----------------------------------------------------------------------------
;--- [TIPS.DH-Example-TypicalButton] ----------------------------------------
#( ''
#define DisableTypicalSetupButtonIfRequired
;--- Decide if we need the typical button --------------------------------
dim DisableTypicalButton : DisableTypicalButton = true<?NewLine>
#if ['<$UISAMPLE_DISABLE_TYPICAL_SETUP>' = 'S']
;--- May want to disable it... ---------------------------------------
<$Table "Feature">
#(
<$Row
@WHERE=^<$UISAMPLE_DISABLE_TYPICAL_SETUP_IF_LEVEL>^
@Code="Y"
>
#)
;--- At least one feature that is deselected by default ----------
DisableTypicalButton = false
<$/Row>
<$/Table>
#endif
;--- Disable the button? -------------------------------------------------
if DisableTypicalButton then<?NewLine>
;--- Disable the "Typical" control (its the same as "Complete") ------
<$Table "Control">
;--- Hide the "Typical" controls ---------------------------------
#(
<$Row @Where="Dialog_ = 'SetupTypeDlg' AND Control = 'TypicalLabel'"
@OK=^? = 1^
*Attributes=^0^
>
#)
#(
<$Row @Where="Dialog_ = 'SetupTypeDlg' AND Control = 'TypicalButton'"
@OK=^? = 1^
*Attributes=^0^
>
#)
#(
<$Row @Where="Dialog_ = 'SetupTypeDlg' AND Control = 'TypicalText'"
@OK=^? = 1^
*Attributes=^0^
>
#)
;--- Move the "Custom" button up a bit to make it look better ----
#(
<$Row @Where="Dialog_ = 'SetupTypeDlg' AND Control = 'CustomButton'"
@OK='=1'
Y="70" ;;Previous value = 118
>
#)
#(
<$Row @Where="Dialog_ = 'SetupTypeDlg' AND Control = 'CustomLabel'"
@OK='=1'
Y="70" ;;Previous value = 118
>
#)
#(
<$Row @Where="Dialog_ = 'SetupTypeDlg' AND Control = 'CustomText'"
@OK='=1'
Y="83" ;;Previous value = 131
>
#)
;--- Tweek the "Complete" button ---------------------------------
#define? UISAMPLE_TWEEKED_COMPLETE_BUTTON_LABEL &Install
#define? UISAMPLE_TWEEKED_COMPLETE_BUTTON_TEXT Install the complete product in the default location.
#(
<$Row @Where="Dialog_ = 'SetupTypeDlg' AND Control = 'CompleteLabel'"
@OK='=1'
Text="[DlgTitleFont]<$UISAMPLE_TWEEKED_COMPLETE_BUTTON_LABEL>"
>
#)
#(
<$Row @Where="Dialog_ = 'SetupTypeDlg' AND Control = 'CompleteText'"
@OK='=1'
Text="<$UISAMPLE_TWEEKED_COMPLETE_BUTTON_TEXT>"
>
#)
<$/Table>
end if
#)
#define? UISAMPLE_DISABLE_TYPICAL_SETUP S ;;User A=Always, S=Sometimes or N=Never
#if ['<$UISAMPLE_DISABLE_TYPICAL_SETUP>' <> 'N']
;--- (either "A" or "S") Disable button if any features have a level > 3 -
#define? UISAMPLE_DISABLE_TYPICAL_SETUP_IF_LEVEL `Level` > 3 ;;Any matches mean that "Typical" <> "Complete"
;#OnExit #51 <$DisableTypicalSetupButtonIfRequired>
<$DisableTypicalSetupButtonIfRequired>
#endif
;--- [TIPS.DH-Example-TypicalButton] ----------------------------------------
;----------------------------------------------------------------------------
;--- PROGRESS BAR: Add a 2nd text control for more detail in custom actions -
;----------------------------------------------------------------------------
#define? UISAMPLE_ADD_2ND_LINE_TO_PROGRESS_DIALOG Y
#if ['<$UISAMPLE_ADD_2ND_LINE_TO_PROGRESS_DIALOG>' = 'Y']
;--- User did not disable updating of the progress control ------------------
;--- [TIPS.DH-Example-ProgressBar2ndLine] -----------------------------------
<$Table "Control">
#(
;--- Add the progress control for the 2nd line ---------------------------
<$Row
Dialog_="ProgressDlg"
Control="ActionData"
Type="Text"
Property=""
X="35"
Y="130"
Width="300"
Height="90"
*Attributes="msidbControlAttributesNoPrefix or msidbControlAttributesVisible or msidbControlAttributesEnabled"
Text=""
Control_Next=""
Help=""
>
#)
<$/Table>
<$Table "EventMapping">
#(
;--- Map the event to the control ----------------------------------------
<$Row
Dialog_="ProgressDlg"
Control_="ActionData"
Event="ActionData"
Attribute="Text"
>
#)
<$/Table>
;--- [TIPS.DH-Example-ProgressBar2ndLine] -----------------------------------
#endif
;----------------------------------------------------------------------------
;--- Need "no prefix" on first line text of progress bar! -------------------
;----------------------------------------------------------------------------
#define? UISAMPLE_ADD_NOPREFIX_TO_1ST_LINE_OF_PROGRESS_DIALOG Y
#if ['<$UISAMPLE_ADD_NOPREFIX_TO_1ST_LINE_OF_PROGRESS_DIALOG>' = 'Y']
<$Table "Control">
#(
<$Row
@Where="`Dialog_` = 'ProgressDlg' AND `Control` = 'ActionText'"
@OK='=1'
@SelfRef="{*}"
*Attributes="{*} or msidbControlAttributesNoPrefix"
>
#)
<$/Table>
#endif
;----------------------------------------------------------------------------
;--- PROGRESS BAR: Fix the "Installing : blah blah" text control ------------
;----------------------------------------------------------------------------
#define? UISAMPLE_LENGTHEN_TITLE_TEXT_CONTROL Y
#if ['<$UISAMPLE_LENGTHEN_TITLE_TEXT_CONTROL>' = 'Y']
<$Table "Control">
#(
<$Row
@Where="Dialog_ = 'ProgressDlg' AND Control = 'Title'"
@OK='=1'
Width="300" ;;Previous value = 200
Height="30" ;;Previous value = 15
>
#)
<$/Table>
#endif
;----------------------------------------------------------------------------
;--- PROGRESS BAR: Want "continuous progress bar" (red bar - actually TitleBar color) ---
;----------------------------------------------------------------------------
#define? UISAMPLE_PROGRESSBAR_WANT_CONTINUOUS Y
#if ['<$UISAMPLE_PROGRESSBAR_WANT_CONTINUOUS>' = 'Y']
<$Table "Control">
#(
<$Row
@Where="Dialog_ = 'ProgressDlg' AND Control = 'ProgressBar'"
@OK='=1'
Attributes="1" ;;Previous value = 65537
>
#)
<$/Table>
#endif
;----------------------------------------------------------------------------
;--- PROGRESS BAR: Better "status" (Cadebug() text line 1) ------------------
;----------------------------------------------------------------------------
#define? UISAMPLE_PROGRESSBAR_CLOSER_AND_LONGER_ACTIONTEXT Y
#if ['<$UISAMPLE_PROGRESSBAR_CLOSER_AND_LONGER_ACTIONTEXT>' = 'Y']
<$Table "Control">
#(
;--- Contains "status:" ----------------------------------------------
<$Row
@Where="`Dialog_` = 'ProgressDlg' AND `Control` = 'StatusLabel'"
@OK='=1'
Width="30" ;;Previous value = 35 - Need to shorten or it overwrites the next control (below) afters its moved left
>
#)
#(
;--- ActionText control that follows the "status:" text --------------
<$Row
@Where="`Dialog_` = 'ProgressDlg' AND `Control` = 'ActionText'"
@OK='=1'
X="65" ;;Previous value = 70 - Move closer to "status:" (way to big a gap)
Width="300" ;;Previous value = 265 - Extend to edge of dialog to get as much of msg as possible
>
#)
<$/Table>
#endif
;----------------------------------------------------------------------------
;--- Put version number into dialog titles ----------------------------------
;----------------------------------------------------------------------------
#define? UISAMPLE_ADD_VERSION_NUMBER_TO_DIALOG_TITLES Y
#if ['<$UISAMPLE_ADD_VERSION_NUMBER_TO_DIALOG_TITLES>' = 'Y']
;--- [TIPS.DH-Example-VersionNumberInDialogTitles] --------------------------
#define? UISAMPLE_LICENCE_SPELLING_C_OR_S c ;;Spelling - Licence OR License?
<$Table "Dialog">
#(
;--- Change all dialogs to include the version number ---------------
<$Row
@Where=^`Title` = '[ProductName] [Setup]'^
@OK=^? > 0^
Title="[ProductName] ([ProductVersion]) [Setup]"
>
#)
#ifndef REMOVED_LicenseAgreementDlg
#(
;--- Change all dialogs to include the version number ---------------
<$Row
@Where=^`Title` = '[ProductName] License Agreement'^
@OK=^? > 0^
Title="[ProductName] ([ProductVersion]) Licen<$UISAMPLE_LICENCE_SPELLING_C_OR_S>e Agreement"
>
#)
#endif
<$/Table>
;--- [TIPS.DH-Example-VersionNumberInDialogTitles] --------------------------
#endif
;----------------------------------------------------------------------------
;--- Fix "licence" spelling -------------------------------------------------
;----------------------------------------------------------------------------
;--- [TIPS.DH-Example-FixLicenceSpelling-GoodRowExample] ---
#if ['<$UISAMPLE_LICENCE_SPELLING_C_OR_S>' = 'c']
;--- We are changing spelling from "license" to "licence" ---------------
#ifndef REMOVED_LicenseAgreementDlg
<$Table "Control">
#(
;--- Look at licence dialog rows ------------------------------------
<$Row
@Where=^`Dialog_` = 'LicenseAgreementDlg'^
@SelfRef="{*}"
*Text=^replace({*}, "icense", "icence")^
>
#)
<$/Table>
#endif
<$Table "RadioButton">
#(
;--- Look at all rows -----------------------------------------------
<$Row
@Where=^^
@SelfRef="{*}"
*Text=^replace({*}, "icense", "icence")^
>
#)
<$/Table>
#endif
;--- [TIPS.DH-Example-FixLicenceSpelling-GoodRowExample] ---
;----------------------------------------------------------------------------
;--- Put MSI name into title bar of ERROR DIALOG ----------------------------
;----------------------------------------------------------------------------
#define? UISAMPLE_MODIFY_ERROR_DIALOG_TITLE Y
#if ['<$UISAMPLE_MODIFY_ERROR_DIALOG_TITLE>' = 'Y']
<$Table "Dialog">
#(
;--- Change all dialogs to include the version number ------------
<$Row
@Where=^`Title` = 'Installer Information'^
@OK=^? > 0^
Title="[ProductName] ([ProductVersion]) - Installer Information"
>
#)
<$/Table>
#endif
;----------------------------------------------------------------------------
;--- Work around to title text overwrite bug (in windows installer + sample) -
;----------------------------------------------------------------------------
#define SpaceToWorkAroundWindowsInstallerBug <?Space>
<$Table "Control">
#(
<$Row
@Where=^`Dialog_` = 'VerifyRepairDlg' and `Control` = 'Title'^
@SelfRef="{*}"
*Text=^{*} & "<$SpaceToWorkAroundWindowsInstallerBug>"^
>
#)
#(
<$Row
@Where=^`Dialog_` = 'VerifyRemoveDlg' and `Control` = 'Title'^
@SelfRef="{*}"
*Text=^{*} & "<$SpaceToWorkAroundWindowsInstallerBug>"^
>
#)
<$/Table>
;----------------------------------------------------------------------------
;--- Increase the size of the ERROR DIALOG (workaround Windows Installer 2.0 bug) ---
;----------------------------------------------------------------------------
#define? UISAMPLE_INCREASE_ERROR_DIALOG_SIZE Y
#if ['<$UISAMPLE_INCREASE_ERROR_DIALOG_SIZE>' = 'Y']
;--- [TIPS.DH-Example-ErrorDialogChanges] -----------------------------------
;--- Make how much bigger? User can override size increase ------------------
#define? UISAMPLE_ERRDLG_INCREASE_WIDTH 150
#define? UISAMPLE_ERRDLG_INCREASE_HEIGHT 80
#define? UISAMPLE_ERRDLG_TYPE Text
;** [CommentBlockStart (September 25, 2003 5:41:48 PM EST, Dennis)
;**+----------------------------------------------------------------------
;**|#define? UISAMPLE_ERRDLG_TYPE ScrollableText ;;Adds vertical scrollbar if required (lines wrap)
;**+----------------------------------------------------------------------
;** CommentBlockEnd] (September 25, 2003 5:41:48 PM EST, Dennis)
#DefineRexx ''
HalfIncreaseWidth = <$UISAMPLE_ERRDLG_INCREASE_WIDTH> / 2
#DefineRexx
;--- Normally Width=270, Height=105 -----------------------------------------
<$Table "Dialog">
#(
;--- Adjust height and width as requested ----------------------------
<$Row
@Where=^`Dialog` = 'ErrorDlg'^
@SelfRef="{*}"
@OK=^? = 1^
*Width=^{*} + <$UISAMPLE_ERRDLG_INCREASE_WIDTH>^
*Height=^{*} + <$UISAMPLE_ERRDLG_INCREASE_HEIGHT>^
>
#)
<$/Table>
<$Table "Control">
#(
;--- Move all the buttons down/right --------------------------------
<$Row
@Where=^`Dialog_` = 'ErrorDlg' and `Type`='PushButton'^
@SelfRef="{*}"
@OK=^? > 0^
*X=^{*} + <??HalfIncreaseWidth>^ ;;Buttons centered
*Y=^{*} + <$UISAMPLE_ERRDLG_INCREASE_HEIGHT>^
>
#)
#(
;--- Fix up the Text control ----------------------------------------
dim ErrorTextControlAttr<?NewLine>
#if ['<$UISAMPLE_ERRDLG_TYPE>' = 'Text']
ErrorTextControlAttr = msidbControlAttributesNoPrefix
#elseif
ErrorTextControlAttr = 0
#end if
<?NewLine>
<$Row
@Where=^`Dialog_` = 'ErrorDlg' and `Control`='ErrorText'^
@SelfRef="{*}"
@OK=^? = 1^
Type="<$UISAMPLE_ERRDLG_TYPE>"
*Attributes=^{*} or ErrorTextControlAttr^
*Width=^{*} + <$UISAMPLE_ERRDLG_INCREASE_WIDTH>^
*Height=^{*} + <$UISAMPLE_ERRDLG_INCREASE_HEIGHT>^
>
#)
<$/Table>
;--- [TIPS.DH-Example-ErrorDialogChanges] -----------------------------------
#endif
;----------------------------------------------------------------------------
;--- Better Welcome Dialog message ------------------------------------------
;----------------------------------------------------------------------------
#(
;--- Better welcome information ------------------------------------------
#define? UISAMPLE_WELCOME_VB_EXPRESSION_FIRST_PARA
"This will install ""[ProductName]"" (version [ProductVersion],
dated [<$COMPANY_PROPERTY_BUILDTIME>]) onto your computer."
#)
#define? UISAMPLE_WELCOME_VB_EXPRESSION_BEFORE_CLICK_NEXT_PARA ;;User can "insert" extra info
#(
;--- Want click text in new paragraph ------------------------------------
#define? UISAMPLE_WELCOME_VB_EXPRESSION_CLICK_NEXT_PARA
& vbCRLF & vbCRLF
& "Click ""Next"" to continue."
#)
<$Table "Control">
#(
<$Row
@Where=^`Dialog_` = 'WelcomeDlg' and `Control`='Description'^
@OK=^? = 1^
Height="165" ;;Might as well define all the space to allow for very long messages.
*Text=^<$UISAMPLE_WELCOME_VB_EXPRESSION_FIRST_PARA><$UISAMPLE_WELCOME_VB_EXPRESSION_BEFORE_CLICK_NEXT_PARA><$UISAMPLE_WELCOME_VB_EXPRESSION_CLICK_NEXT_PARA>^
>
#)
<$/Table>
;----------------------------------------------------------------------------
;--- Remove the "MaintenanceWelcomeDlg" -------------------------------------
;----------------------------------------------------------------------------
#define? UISAMPLE_REMOVE_MaintenanceWelcomeDlg Y
#if ['<$UISAMPLE_REMOVE_MaintenanceWelcomeDlg>' = 'Y']
;--- [TIPS.DH-Example-DialogRemoval-MaintenanceWelcomeDlg] ------------------
<$Table "InstallUISequence">
;--- "Skip" the welcome dialog -------------------------------------------
#(
<$Row
@Where=^`Action` = 'MaintenanceWelcomeDlg'^
@OK=^? = 1^
Action="MaintenanceTypeDlg"
>
#)
<$/Table>
;--- There is now no "previous" dialog (could have deleted control as well) -
<$Table "Control">
#(
<$Row
@Where=^`Dialog_` = 'MaintenanceTypeDlg' and `Control`='Back'^
@SelfRef="{*}"
@OK=^? = 1^
*Attributes=^{*} and not (msidbControlAttributesVisible or msidbControlAttributesEnabled)^ ;;Reset these bits
>
#)
<$/Table>
;--- [TIPS.DH-Example-DialogRemoval-MaintenanceWelcomeDlg] ------------------
#endif
;----------------------------------------------------------------------------
;--- Don't need "CD KEY -----------------------------------------------------
;----------------------------------------------------------------------------
#define? UISAMPLE_ASK_FOR_CDKEY N ;;Normally I don't want to...
#if ['<$UISAMPLE_ASK_FOR_CDKEY>' <> 'Y']
;--- Remove CD-KEY related stuff -----------------------------------------
<$Table "Control">
;--- Fix "UserRegistrationDlg" & "AdminRegistrationDlg" --------------
#(
#define RemoveCdKey
<$RowsDelete WHERE="Dialog_ = '{$#1}' AND Control = 'CDKeyLabel'">
<$RowsDelete WHERE="Dialog_ = '{$#1}' AND Control = 'CDKeyEdit'">
#(
<$Row @Where="Dialog_ = '{$#1}' AND Control = 'OrganizationEdit'" @OK='=1'
Control_Next="Back" ;;Previous value = CDKeyLabel
>
#)
#)
#ifndef REMOVED_UserRegistrationDlg
<$RemoveCdKey "UserRegistrationDlg">
#endif
<$RemoveCdKey "AdminRegistrationDlg">
<$/Table>
#endif
;----------------------------------------------------------------------------
;--- Want ADMIN REGISTRATION DIALOG? ----------------------------------------
;----------------------------------------------------------------------------
#define? UISAMPLE_WANT_ADMIN_REGISTRATION_DIALOG N
#if ['<$UISAMPLE_WANT_ADMIN_REGISTRATION_DIALOG>' <> 'Y']
<$Table "ControlEvent">
;--- Correct Next Link -----------------------------------------------
#(
<$Row
@Where=^Dialog_ = 'AdminWelcomeDlg' AND Control_ = 'Next' AND Event = 'NewDialog' AND Argument = 'AdminRegistrationDlg' AND Condition = '1'^
@OK=^=1^
Argument="AdminInstallPointDlg"
>
#)
;--- Correct "Back Link ----------------------------------------------
#(
<$Row
@Where=^Dialog_ = 'AdminInstallPointDlg' AND Control_ = 'Back' AND Event = 'NewDialog' AND Argument = 'AdminRegistrationDlg' AND Condition = '1'^
@OK=^=1^
Argument="AdminWelcomeDlg"
>
#)
<$/Table>
#endif
;----------------------------------------------------------------------------
;--- Add message to bottom bar (on left) ------------------------------------
;----------------------------------------------------------------------------
#define? UISAMPLE_ADD_MSG_TO_BOTTOM_BAR Y
#if ['<$UISAMPLE_ADD_MSG_TO_BOTTOM_BAR>' = 'Y']
;--- Define some options -------------------------------------------------
;---[4Doco-UISAMPLE_ADD_MSG_TO_BOTTOM_BAR]---
#define? UISAMPLE_BLINE_TEXT MakeMsi by Dennis Bareis
#define? UISAMPLE_BLINE_TEXT_INDENT 2 ;;Tiny bit in
#define? UISAMPLE_BLINE_TEXT_HEIGHT 10
#define? UISAMPLE_BLINE_TEXT_STYLE 0
#ifdef UISAMPLE_BLINE_SIMPLE
;--- You chose "simple" ----------------------------------------------
#define? UISAMPLE_BLINE_TEXT_FONT Arial
#define? UISAMPLE_BLINE_TEXT_FONT_SIZE 8
#define? UISAMPLE_BLINE_TEXT_COLOR &H7F7F7F ;;BGR (only Microsoft... For the last 20 or so years every company on Earth has used RGB including MS...)
#define? UISAMPLE_BLINE_TEXT_WIDTH 102 ;;You'll need to do a bit of "Trial and Error" to get this right...
#elseif
;--- I think this mechanism looks better -----------------------------
#define? UISAMPLE_BLINE_TEXT_FONT Tahoma
#define? UISAMPLE_BLINE_TEXT_FONT_SIZE 8
#define? UISAMPLE_BLINE_TEXT_WIDTH 95 ;;You'll need to do a bit of "Trial and Error" to get this right...
#endif
;---[4Doco-UISAMPLE_ADD_MSG_TO_BOTTOM_BAR]---
#(
#define? UISAMPLE_BLINE_EXCEPTION_DIALOGS ;;These have the graphic on the left
and (`Dialog_` <> 'AdminWelcomeDlg')
and (`Dialog_` <> 'ExitDialog')
and (`Dialog_` <> 'FatalError')
and (`Dialog_` <> 'MaintenanceWelcomeDlg')
and (`Dialog_` <> 'PrepareDlg')
and (`Dialog_` <> 'ResumeDlg')
and (`Dialog_` <> 'UserExit')
and (`Dialog_` <> 'WelcomeDlg')
#)
<$Table "Control">
;--- Modify existing bottom line record ------------------------------
#(
<$Row
@Where=^`Control`='BottomLine' and `Type`='Line' <$UISAMPLE_BLINE_EXCEPTION_DIALOGS>^
@SelfRef="{*}"
@OK=^? >= 1^
*X='{*} + <$UISAMPLE_BLINE_TEXT_WIDTH> + <$UISAMPLE_BLINE_TEXT_INDENT>'
*Width='{*} - <$UISAMPLE_BLINE_TEXT_WIDTH> - <$UISAMPLE_BLINE_TEXT_INDENT>'
>
#)
<$/Table>
;--- Insert the new branding text ----------------------------------------
#ifdef UISAMPLE_BLINE_SIMPLE
;--- Use the simple format (one color) -------------------------------
<$Table "TextStyle">
#(
;--- Set up the font type and color ------------------------------
<$Row
TextStyle="BrandingLineText"
FaceName="<$UISAMPLE_BLINE_TEXT_FONT>"
Size="<$UISAMPLE_BLINE_TEXT_FONT_SIZE>"
Color="<$UISAMPLE_BLINE_TEXT_COLOR>"
StyleBits="<$UISAMPLE_BLINE_TEXT_STYLE>"
>
#)
<$/TABLE>
<$Table "Control">
;--- Insert "Bottom Line" Text -----------------------------------
#(
<$Row
@Where=^`Control`='BottomLine' and `Type`='Line' <$UISAMPLE_BLINE_EXCEPTION_DIALOGS>^
@Method="INSERT"
@SelfRef="{*}"
@OK=^? >= 1^
Control="BrandingLineText"
Type="Text"
X=^<$UISAMPLE_BLINE_TEXT_INDENT>^
Height=^<$UISAMPLE_BLINE_TEXT_HEIGHT>^
Y=^{*} - (<$UISAMPLE_BLINE_TEXT_HEIGHT>\2)^ ;;Y (line goes in middle)
Attributes=^{*} or msidbControlAttributesTransparent^
Text=^{&BrandingLineText}<$UISAMPLE_BLINE_TEXT>^
Control_Next=""
Help=""
>
#)
<$/Table>
#elseif
;--- Use more complex embossed form ----------------------------------
<$Table "TextStyle">
#(
;--- Lower right text (applied first) ------------------------
<$Row
TextStyle="BrandingLR"
FaceName="<$UISAMPLE_BLINE_TEXT_FONT>"
Size="<$UISAMPLE_BLINE_TEXT_FONT_SIZE>"
Color="&HFFFFFF" ;;White
StyleBits="<$UISAMPLE_BLINE_TEXT_STYLE>"
>
#)
#(
;--- Upper Left (applied second) -----------------------------
<$Row
TextStyle="BrandingUL"
FaceName="Tahoma"
Size="<$UISAMPLE_BLINE_TEXT_FONT_SIZE>"
Color=""
StyleBits="<$UISAMPLE_BLINE_TEXT_STYLE>"
>
#)
<$/Table>
<$Table "Control">
#(
;--- Lower right line (APPLIED FIRST) ------------------------
<$Row
@Where=^`Control`='BottomLine' and `Type`='Line' <$UISAMPLE_BLINE_EXCEPTION_DIALOGS>^
@Method="INSERT"
@SelfRef="{*}"
@OK=^? >= 1^
Control="BrandingLR" ;;Slightly lower and righter
Type="Text"
X=^<$UISAMPLE_BLINE_TEXT_INDENT> + 1^
Y=^{*} - (<$UISAMPLE_BLINE_TEXT_HEIGHT>\2)+1^ ;;Y (line goes in middle)
Height=^<$UISAMPLE_BLINE_TEXT_HEIGHT>^
Width="<$UISAMPLE_BLINE_TEXT_WIDTH>"
Attributes="msidbControlAttributesVisible or msidbControlAttributesNoPrefix"
Text="{&BrandingLR}<$UISAMPLE_BLINE_TEXT>"
Control_Next=""
Help=""
>
#)
#(
;--- Upper Left line (APPLIED SECOND - over "BrandingLR") ----
<$Row
@Where=^`Control`='BottomLine' and `Type`='Line' <$UISAMPLE_BLINE_EXCEPTION_DIALOGS>^
@Method="INSERT"
@SelfRef="{*}"
@OK=^? >= 1^
Control="BrandingUL"
Type="Text"
Property=""
X=^<$UISAMPLE_BLINE_TEXT_INDENT>^
Y=^{*} - (<$UISAMPLE_BLINE_TEXT_HEIGHT>\2)^ ;;Y (line goes in middle)
Height=^<$UISAMPLE_BLINE_TEXT_HEIGHT>^
Width="<$UISAMPLE_BLINE_TEXT_WIDTH>"
Attributes="msidbControlAttributesVisible or msidbControlAttributesTransparent or msidbControlAttributesNoPrefix"
Text="{&BrandingUL}<$UISAMPLE_BLINE_TEXT>"
Control_Next=""
Help=""
>
#)
<$/Table>
#endif
#endif
;----------------------------------------------------------------------------
;--- MS "CustomizeDlg" has problems (things don't fit by default!) ----------
;----------------------------------------------------------------------------
#define? UISAMPLE_ADJUST_CustomizeDlg Y
#if ['<$UISAMPLE_ADJUST_CustomizeDlg>' = 'Y']
#define? UISAMPLE_FeatureDirFont {&FeatureDirFont}
<$Table "Control">
;--- Make group box etc wider so things fit. Also looks better! ------
#(
<$Row
@Where="Dialog_ = 'CustomizeDlg' AND Control = 'Description'"
@OK='=1'
X="15" ;;Previous value = 25
Width="290" ;;Previous value = 280
>
#)
#(
<$Row
@Where="Dialog_ = 'CustomizeDlg' AND Control = 'Text'"
@OK='=1'
X="15" ;;Previous value = 25
Width="330" ;;Previous value = 320
>
#)
#(
<$Row
@Where="Dialog_ = 'CustomizeDlg' AND Control = 'Tree'"
@OK='=1'
X="10" ;;Previous value = 25
Y="77" ;;Previous value = 85
Width="189" ;;Previous value = 175
Height="123" ;;Previous value = 95
>
#)
#(
<$Row
@Where="Dialog_ = 'CustomizeDlg' AND Control = 'Box'"
@OK='=1'
X="207" ;;Previous value = 210
Y="73" ;;Previous value = 81
Width="153" ;;Previous value = 140
Height="127" ;;Previous value = 98
>
#)
#(
<$Row
@Where="Dialog_ = 'CustomizeDlg' AND Control = 'LocationLabel'"
@OK='=1'
X="15" ;;Previous value = 25
Y="203" ;;Previous value = 200
Width="37" ;;Previous value = 50
Height="11" ;;Previous value = 10
>
#)
#(
<$Row
@Where="Dialog_ = 'CustomizeDlg' AND Control = 'Location'"
@OK='=1'
X="55" ;;Previous value = 75
Y="203" ;;Previous value = 200
Width="243" ;;Previous value = 215
Height="31" ;;Previous value = 20
Text="<$UISAMPLE_FeatureDirFont><The feature's path>"
>
#)
#(
<$Row
@Where="Dialog_ = 'CustomizeDlg' AND Control = 'Browse'"
@OK='=1'
Y="208" ;;Previous value = 200
>
#)
#(
<$Row
@Where="Dialog_ = 'CustomizeDlg' AND Control = 'ItemDescription'"
@OK='=1'
X="212" ;;Previous value = 215
Y="79" ;;Previous value = 90
Width="144" ;;Previous value = 131
Height="65" ;;Previous value = 30
>
#)
#(
<$Row
@Where="Dialog_ = 'CustomizeDlg' AND Control = 'ItemSize'"
@OK='=1'
X="212" ;;Previous value = 215
Y="147" ;;Previous value = 130
Width="144" ;;Previous value = 131
Height="51" ;;Previous value = 45
>
#)
<$/Table>
#ifndef UISAMPLE_FeatureDirFont_DONT_CREATE
;--- The user wants this item (not overriding etc) -------------------
<$Table "TextStyle">
#(
<$Row
TextStyle="FeatureDirFont"
FaceName="Tahoma"
Size="8"
Color="16711680"
>
#)
<$/Table>
#endif
#endif
;----------------------------------------------------------------------------
;--- Replace the custom setup icon with a better one ------------------------
;----------------------------------------------------------------------------
#define? UISAMPLE_NEW_custicon MmCustomSetup.ico
#if ['<$UISAMPLE_NEW_custicon>' <> '']
<$Binary "<$UISAMPLE_NEW_custicon>" KEY="custicon" DOCO="N" @Validate="FIELD">
#end if
;----------------------------------------------------------------------------
;--- Replace long horizontal white bar (on top) with graphic by 2 new -------
;----------------------------------------------------------------------------
#define? UISAMPLE_CHANGE_bannrbmp Y
#if ['<$UISAMPLE_CHANGE_bannrbmp>' = 'Y']
;--- [TIPS.DH-Example-WhiteBarWithLogo] -------------------------------------
;--- MAKEMSI MSI smaller, use smaller banner graphic ------------------------
#define? UISAMPLE_BITMAP_WHITE_BANNER white.bmp ;;Pure white banner (no graphic)
<$Binary "<$UISAMPLE_BITMAP_WHITE_BANNER>" KEY="bannrbmp" DOCO="N" @Validate="FIELD"> ;;Very small image gets sized to fill area
;--- If user wants a small graphic on the banner (like original) then add it ---
#define? UISAMPLE_BITMAP_BANNER_GRAPHIC
#if ['<$UISAMPLE_BITMAP_BANNER_GRAPHIC>' <> '']
;--- User wants the small right hand side graphic -----------------------
<$Binary "<$UISAMPLE_BITMAP_BANNER_GRAPHIC>" KEY="BannerGraphic.BMP" DOCO="N"> ;;Will place fixed size bitmap on right of filled area
<$Table "Control">
#(
;--- Add new control for fixed size logo on right --------------------
<$Row
@Where="`Control` = 'BannerBitmap'"
@Method="INSERT"
@OK=^? > 0^
Control="CompanyLogo"
X="330"
Y="10"
Width="26"
Height="26"
Attributes="&H00100001" ;;Fixed size bitmap
Text="BannerGraphic.BMP"
Control_Next=""
>
#)
<$/Table>
#end if
;--- [TIPS.DH-Example-WhiteBarWithLogo] -------------------------------------
#endif
;----------------------------------------------------------------------------
;--- Replace Left Side (Whole dialog actually) graphic if wanted ------------
;----------------------------------------------------------------------------
#define? UISAMPLE_DIALOG_FILE_dlgbmp LeftSide.bmp ;;"" = No change!
#if ['<$UISAMPLE_DIALOG_FILE_dlgbmp>' <> '']
;--- Replace standard bitmap on left side of welcome and other dialogs ---
<$Binary "<$UISAMPLE_DIALOG_FILE_dlgbmp>" KEY="dlgbmp" DOCO="N" @Validate="FIELD">
;--- If you have left the top of the new graphic clear, put text there? ---
#define? UISAMPLE_LEFTSIDE_TEXT Developed by <$DEPT_NAME> - <$DEPT_ADDRESS>.
#if ['<$UISAMPLE_LEFTSIDE_TEXT $$IsBlank>' = 'N']
;--- Set some defaults ----------------------------------------------
#define? UISAMPLE_LEFTSIDE_TEXT_FONT_NAME Tahoma
#define? UISAMPLE_LEFTSIDE_TEXT_FONT_SIZE 12
#define? UISAMPLE_LEFTSIDE_TEXT_FONT_COLOR &H007F00 ;;Color in BGR (believe it or not... Only MS could do this...)
#define? UISAMPLE_LEFTSIDE_TEXT_FONT_STYLE 1
#define? UISAMPLE_LEFTSIDE_TEXT_X 5 ;;Trial and error will be required for all coordinates (don't match pixels either...)
#define? UISAMPLE_LEFTSIDE_TEXT_Y 5
#define? UISAMPLE_LEFTSIDE_TEXT_WIDTH 110
#define? UISAMPLE_LEFTSIDE_TEXT_HEIGHT 185 ;;How much of bitmap is "clear"?
;--- Create the font -------------------------------------------------
<$Table "TextStyle">
#(
<$Row
TextStyle="UISAMPLE_LEFTSIDE_TEXT"
FaceName="<$UISAMPLE_LEFTSIDE_TEXT_FONT_NAME>"
Size="<$UISAMPLE_LEFTSIDE_TEXT_FONT_SIZE>"
Color="<$UISAMPLE_LEFTSIDE_TEXT_FONT_COLOR>"
StyleBits="<$UISAMPLE_LEFTSIDE_TEXT_FONT_STYLE>"
>
#)
<$/Table>
;--- Insert "Left Hand GRAPHIC TEXT" control into all relevant dialogs ---
<$Table "Control">
#(
<$Row
@Where=^`Text`='[DialogBitmap]'^
@Method="INSERT"
@SelfRef="{*}"
@OK=^? >= 1^
Control="BrandingOnLeftSideBitmap"
Type="Text"
X="<$UISAMPLE_LEFTSIDE_TEXT_X>"
Y="<$UISAMPLE_LEFTSIDE_TEXT_Y>"
Width="<$UISAMPLE_LEFTSIDE_TEXT_WIDTH>"
Height="<$UISAMPLE_LEFTSIDE_TEXT_HEIGHT>"
Attributes="&H10003"
Property=""
Text="{&UISAMPLE_LEFTSIDE_TEXT}<$UISAMPLE_LEFTSIDE_TEXT>"
Control_Next=""
Help=""
>
#)
<$/Table>
#endif
#endif
;----------------------------------------------------------------------------
;--- Fix some Microsoft UISAMPLE.MSI formatting/sizing errors ---------------
;----------------------------------------------------------------------------
#define? UISAMPLE_FIX_WELCOME_LIKE_SIZING_PROBLEMS Y
#if ['<$UISAMPLE_FIX_WELCOME_LIKE_SIZING_PROBLEMS>' = 'Y']
<$Table "Control">
#(
<$Row
@Where="Dialog_ = 'AdminWelcomeDlg' AND Control = 'Description'"
@OK='=1'
Y="85" ;;Previous value = 70
>
#)
#(
<$Row
@Where="Dialog_ = 'ExitDialog' AND Control = 'Description'"
@OK='=1'
Y="85" ;;Previous value = 70
>
#)
#(
<$Row
@Where="Dialog_ = 'FatalError' AND Control = 'Description1'"
@OK='=1'
Y="85" ;;Previous value = 70
>
#)
#(
<$Row
@Where="Dialog_ = 'FatalError' AND Control = 'Description2'"
@OK='=1'
Y="130" ;;Previous value = 115
>
#)
#(
<$Row
@Where="Dialog_ = 'PrepareDlg' AND Control = 'Description'"
@OK='=1'
Y="85" ;;Previous value = 70
>
#)
#(
<$Row
@Where="Dialog_ = 'PrepareDlg' AND Control = 'ActionText'"
@OK='=1'
Y="130" ;;Previous value = 100
Text="Initialising... Please wait..."
>
#)
#(
<$Row
@Where="Dialog_ = 'PrepareDlg' AND Control = 'ActionData'"
@OK='=1'
Y="155" ;;Previous value = 125
>
#)
#(
<$Row
@Where="Dialog_ = 'UserExit' AND Control = 'Description1'"
@OK='=1'
Y="85" ;;Previous value = 70
>
#)
#(
<$Row
@Where="Dialog_ = 'UserExit' AND Control = 'Description2'"
@OK='=1'
Y="130" ;;Previous value = 115
>
#)
#(
<$Row
@Where="Dialog_ = 'MaintenanceWelcomeDlg' AND Control = 'Description'"
@OK='=1'
Y="85" ;;Previous value = 70
>
#)
#(
<$Row
@Where="Dialog_ = 'ResumeDlg' AND Control = 'Description'"
@OK='=1'
Y="85" ;;Previous value = 70
>
#)
#(
<$Row
@Where="Dialog_ = 'WelcomeDlg' AND Control = 'Description'"
@OK='=1'
Y="85" ;;Previous value = 70
>
#)
<$/Table>
#endif
;** [CommentBlockStart (September 9, 2005 5:36:56 PM EST, Dennis)
;**+----------------------------------------------------------------------
;**|;----------------------------------------------------------------------------
;**|;--- Want all dialogs positioned in the CENTRE of the screen ----------------
;**|;----------------------------------------------------------------------------
;**|#define? UISAMPLE_ALL_DIALOGS_IN_CENTER_OF_SCREEN Y
;**|#if ['<$UISAMPLE_ALL_DIALOGS_IN_CENTER_OF_SCREEN>' = 'Y']
;**| <$Table "Dialog">
;**| #(
;**| ;--- Change all dialogs to include the version number ---------------
;**| <$Row
;**| @Where=^`HCentering` <> 50 or `VCentering` <> 50^
;**| @OK=^? > 0^
;**| HCentering="50"
;**| VCentering="50"
;**| >
;**| #)
;**| <$/Table>
;**|#endif
;**+----------------------------------------------------------------------
;** CommentBlockEnd] (September 9, 2005 5:36:56 PM EST, Dennis)
;----------------------------------------------------------------------------
;--- Want to reposition some dialogs? ---------------------------------------
;----------------------------------------------------------------------------
#(
;--- Define empty list to disable ---------------------------------------
#define? UISAMPLE_REPOSITION_THESE_DIALOGS
CancelDlg
ErrorDlg
WaitForCostingDlg
#)
#define? UISAMPLE_REPOSITION_DIALOGS_H 60 ;;Just a bit to the right
#define? UISAMPLE_REPOSITION_DIALOGS_V 75 ;;Down enough for progress info to be visible
#(
;--- Another macro example, not really required... ----------------------
#define RepositionDialog
<$Table "Dialog">
#(
;--- Reposition the specified dialog -----------------------------
<$Row
@Where=^`Dialog` = '{$#1}'^
@OK=^? = 1^
HCentering="{$H=^<$UISAMPLE_REPOSITION_DIALOGS_H>^}"
VCentering="{$V=^<$UISAMPLE_REPOSITION_DIALOGS_V>^}"
>
#)
<$/Table>
#)
#{ SET "@@Dlg={ }<$UISAMPLE_REPOSITION_THESE_DIALOGS>"
;--- Reposition each configured Dialog ----------------------------------
<$RepositionDialog "<??SET_@@Dlg>">
#}
;----------------------------------------------------------------------------
;--- Reduce the UI (a better "basic" UILevel) -------------------------------
;----------------------------------------------------------------------------
#define? UISAMPLE_REDUCED_UI_PROPERTY_NAME MM_REDUCED_UI ;;Blank means don't add support! Upper Case = can be set on command line
#define? UISAMPLE_REDUCED_UI_VALUE 0 ;;0 = normal, 1 = reduced UI (on install only)
#if ['<$UISAMPLE_REDUCED_UI_PROPERTY_NAME>' <> '']
;--- Create the property as requested ------------------------------------
<$Property "<$UISAMPLE_REDUCED_UI_PROPERTY_NAME>" Value="<$UISAMPLE_REDUCED_UI_VALUE>">
;--- Update the UI information to look at the above property -------------
<$Table "InstallUISequence">
#(
;--- The condition is normally "" --------------------------------
<$Row
@Where="Action = 'ExitDialog'"
@OK='=1'
Condition="Installed or (<$UISAMPLE_REDUCED_UI_PROPERTY_NAME> = 0)"
>
#)
#(
;--- The condition is normally "NOT Installed" -------------------
<$Row
@Where="Action = 'WelcomeDlg'"
@OK='=1'
Condition="NOT Installed and (<$UISAMPLE_REDUCED_UI_PROPERTY_NAME> = 0)"
>
#)
<$/Table>
#endif
;----------------------------------------------------------------------------
;--- Fix Spelling errors ----------------------------------------------------
;----------------------------------------------------------------------------
#define? UISAMPLE_FIX_SPELLING_REPAIRES N ;;Mispelt in older versions of "uisample.msi".
#if ['<$UISAMPLE_FIX_SPELLING_REPAIRES>' = 'Y']
<$Table "ControlEvent">
#(
<$Row
@WHERE="Dialog_ = 'MaintenanceTypeDlg' AND Control_ = 'RepairButton' AND Event = '[Progress2]' AND Argument = 'repaires' AND Condition = '1'"
@OK=^=1^
@METHOD="Replace"
Argument="repairs"
>
#)
<$/Table>
#endif
;----------------------------------------------------------------------------
;--- Fix ICE45 Issue with new attributes (ElevationShield etc) --------------
;----------------------------------------------------------------------------
#define? UISAMPLE_FIX_ICE45_VERIFY_BUTTON_ATTRIBUTES Y
#if ['<$UISAMPLE_FIX_ICE45_VERIFY_BUTTON_ATTRIBUTES>' = 'Y']
;--- Microsoft's bug in latest validation CUB files (_ReservedBits table) ---
#define+ @@REASON Work around Microsoft's bug in latest validation CUB files (_ReservedBits table)
<$MsiValFilter "Row 'VerifyRepairDlg.Repair' in table 'Control' has bits set in the 'Attributes' column that are reserved" Comment=^<$@@REASON>^>
<$MsiValFilter "Row 'VerifyRemoveDlg.Remove' in table 'Control' has bits set in the 'Attributes' column that are reserved" Comment=^<$@@REASON>^>
<$MsiValFilter "Row 'VerifyReadyDlg.Install' in table 'Control' has bits set in the 'Attributes' column that are reserved" Comment=^<$@@REASON>^>
#endif
;----------------------------------------------------------------------------
;--- For now take care of ICE06/ICE46 messages about new Shortcut Columns ---
;----------------------------------------------------------------------------
#if ['<$TABLES_SHORTCUT_DEFINE_WI_4_COLS $$UPPER>' = 'N']
;--- We haven't defined the extra columns, so care about warnings? ------
#define? UISAMPLE_IGNORE_MISSING_WI_4_SHORTCUT_COLUMNS Y
#if ['<$UISAMPLE_IGNORE_MISSING_WI_4_SHORTCUT_COLUMNS>' = 'Y']
#define+ @@REASON No biggy if _Validation table is missing these "Shortcut" columns
<$MsiValFilter Comment=^<$@@REASON>^ "DescriptionResourceDLL of Table: Shortcut is not defined in database">
<$MsiValFilter Comment=^<$@@REASON>^ "DescriptionResourceId of Table: Shortcut is not defined in database">
<$MsiValFilter Comment=^<$@@REASON>^ "DisplayResourceDLL of Table: Shortcut is not defined in database">
<$MsiValFilter Comment=^<$@@REASON>^ "DisplayResourceId of Table: Shortcut is not defined in database">
<$MsiValFilter Comment=^<$@@REASON>^ "Error retrieving values from column DescriptionResourceDLL in table Shortcut">
<$MsiValFilter Comment=^<$@@REASON>^ "Error retrieving values from column DisplayResourceDLL in table Shortcut">
#endif
#endif
;----------------------------------------------------------------------------
;--- Remove these unwanted "UISAMPLE.MSI" bits ------------------------------
;----------------------------------------------------------------------------
<$Table "Property">
<$RowsDelete where=^`Property` = 'ComponentDownload'^>
<$/Table>
;----------------------------------------------------------------------------
;--- No "UserExit" dialog after "YES" pressed on Cancel Dialog! ------------
;----------------------------------------------------------------------------
#define? UISAMPLE_NO_USEREXIT_DIALOG_AFTER_CANCEL_CONFIRMATION Y
#if ['<$UISAMPLE_NO_USEREXIT_DIALOG_AFTER_CANCEL_CONFIRMATION>' = 'Y']
<$Table "ControlEvent">
;--- Modify existing row to change ordering --------------------------
#(
<$Row
@Where="Dialog_ = 'CancelDlg' AND Control_ = 'Yes' AND Event = 'EndDialog' AND Argument = 'Exit' AND Condition = '1'"
@OK='=1'
Ordering="2"
>
#)
;--- Add new row to set property if "YES" selected -------------------
#(
<$Row
Dialog_="CancelDlg"
Control_="Yes"
Event="[UserPressedYesOnCancelDlg]"
Argument="YES"
Condition="1"
Ordering="1"
>
#)
<$/Table>
<$Table "InstallUISequence">
;--- Change "UserExit" dialog to not appear if "YES" selected on "CancelDlg" ---
#(
<$Row
@Where="Action = 'UserExit'"
@OK='=1'
Condition="not UserPressedYesOnCancelDlg"
>
#)
<$/Table>
#endif
;----------------------------------------------------------------------------
;--- "Install Instructions" button on "WelcomeDlg" -------------------------
;----------------------------------------------------------------------------
;---[ForDoco.INSTALL_INSTRUCTIONS.Options]---
#define? UISAMPLE_ADD_INSTALL_INSTRUCTIONS_BUTTON_URL ;;URL (blank=no button)
#define? UISAMPLE_ADD_INSTALL_INSTRUCTIONS_BUTTON_DLG_LIST PrepareDlg WelcomeDlg ;;List of dialogs to apply to (space separated)
#define? UISAMPLE_ADD_INSTALL_INSTRUCTIONS_BUTTON_TEXT &Install Instructions
#define? UISAMPLE_ADD_INSTALL_INSTRUCTIONS_BUTTON_TEXTSTYLE {&FeatureDirFont} ;;Doesn't seem to work
#define? UISAMPLE_ADD_INSTALL_INSTRUCTIONS_BUTTON_BUTTON_X 20
#define? UISAMPLE_ADD_INSTALL_INSTRUCTIONS_BUTTON_BUTTON_Y 243
#define? UISAMPLE_ADD_INSTALL_INSTRUCTIONS_BUTTON_BUTTON_WIDTH 80
#define? UISAMPLE_ADD_INSTALL_INSTRUCTIONS_BUTTON_BUTTON_HEIGHT 17
#define? UISAMPLE_ADD_INSTALL_INSTRUCTIONS_BUTTON_TOOLTIP <$UISAMPLE_ADD_INSTALL_INSTRUCTIONS_BUTTON_URL>
;---[ForDoco.INSTALL_INSTRUCTIONS.Options]---
#if ['<$UISAMPLE_ADD_INSTALL_INSTRUCTIONS_BUTTON_URL>' <> '']
;--- For each dialog... -------------------------------------------------
#{ set ^@@Dlg={ }<$UISAMPLE_ADD_INSTALL_INSTRUCTIONS_BUTTON_DLG_LIST>^
;--- Add the control to the dialog ----------------------------------
<$Table "Control">
#(
<$Row
Dialog_="<??SET_@@Dlg>"
Control="InstallInstructions"
Type="PushButton"
Attributes="msidbControlAttributesVisible or msidbControlAttributesEnabled"
Text="<$UISAMPLE_ADD_INSTALL_INSTRUCTIONS_BUTTON_TEXTSTYLE><$UISAMPLE_ADD_INSTALL_INSTRUCTIONS_BUTTON_TEXT>"
Help="<$UISAMPLE_ADD_INSTALL_INSTRUCTIONS_BUTTON_TOOLTIP>|"
X="<$UISAMPLE_ADD_INSTALL_INSTRUCTIONS_BUTTON_BUTTON_X>"
Y="<$UISAMPLE_ADD_INSTALL_INSTRUCTIONS_BUTTON_BUTTON_Y>"
Width="<$UISAMPLE_ADD_INSTALL_INSTRUCTIONS_BUTTON_BUTTON_WIDTH>"
Height="<$UISAMPLE_ADD_INSTALL_INSTRUCTIONS_BUTTON_BUTTON_HEIGHT>"
>
#)
<$/Table>
<$Table "ControlEvent">
#(
;--- Handle button click -------------------------------------
<$Row
Dialog_="<??SET_@@Dlg>"
Control_="InstallInstructions"
Event="DoAction"
Argument="InstallInstructions"
Condition="1"
>
#)
<$/Table>
#}
;--- Look for IEXPLORE.EXE, if not found then disable the above control! ---
<$RegistryRead Property="IE_EXE" HKEY="LOCAL_MACHINE" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE" DEFAULT="">
<$Table "ControlCondition">
#{ set ^@@Dlg={ }<$UISAMPLE_ADD_INSTALL_INSTRUCTIONS_BUTTON_DLG_LIST>^
#if ['<??SET_@@Dlg>' <> 'PrepareDlg'] ;;Prepare dialog may appear before "AppSearch", if so "AppSearch" happens while dialog is up...
;--- "AppSearch" well and truely over... --------------------
<$Row Dialog_="<??SET_@@Dlg>" Control_="InstallInstructions" Action="Disable" Condition="not IE_EXE" >
#endif
#}
<$/Table>
;--- Define the action --------------------------------------------------
<$Table "CustomAction">
#(
;--- Invoke IE to display install instructions -------------------
<$Row
Action="InstallInstructions"
Type="50 or msidbCustomActionTypeAsync or msidbCustomActionTypeContinue"
Source="IE_EXE"
Target=^"<$UISAMPLE_ADD_INSTALL_INSTRUCTIONS_BUTTON_URL>"^
>
;** [CommentBlockStart (22 April 2006 18:27:07, Dennis)
;**+----------------------------------------------------------------------
;**| ;--- Invoke IE to display install instructions -------------------
;**| <$Row
;**| Action="InstallInstructions"
;**| Type="34 or msidbCustomActionTypeAsync or msidbCustomActionTypeContinue"
;**| Source="<$AnyDir>"
;**| Target=^"[IE_EXE]" "<$UISAMPLE_ADD_INSTALL_INSTRUCTIONS_BUTTON_URL>"^
;**| >
;**| #)
;**+----------------------------------------------------------------------
;** CommentBlockEnd] (22 April 2006 18:27:07, Dennis)
#)
<$/Table>
#endif
;----------------------------------------------------------------------------
;--- Make "FatalError" dialog more obvious ----------------------------------
;----------------------------------------------------------------------------
#define? UISAMPLE_MAKE_FatalError_DIALOG_MORE_OBVIOUS Y
#if ['<$UISAMPLE_MAKE_FatalError_DIALOG_MORE_OBVIOUS>' = 'Y']
;--- Make the larger text red -------------------------------------------
<$Table "Control">
#(
<$Row
@Where="`Dialog_` = 'FatalError' AND `Control` = 'Title'"
@OK='=1'
Text="{\VerdanaBold13Red}[ProductName] [Wizard] ended prematurely" ;;Previous value = {\VerdanaBold13}[ProductName] [Wizard] ended prematurely
>
#)
<$/Table>
<$Table "TextStyle">
#(
<$Row
TextStyle="VerdanaBold13Red"
FaceName="Verdana"
Size="13"
Color="255" ;;RED in BGR format (only Microsoft...)
StyleBits="1"
>
#)
<$/Table>
#endif
;-------------------------------------------------------------------------------------
;--- Allow more Verification Text (perhaps when translated to other languages etc) ---
;-------------------------------------------------------------------------------------
#define? UISAMPLE_NEWSIZE_VerifyReadyDlg.Text 160 ;;0 = No change
#if [<$UISAMPLE_NEWSIZE_VerifyReadyDlg.Text> <> 0]
;--- No reason why it shouldn't be bigger -------------------------------
<$Table "Control">
#(
<$Row
@Where="Dialog_ = 'VerifyReadyDlg' AND Control = 'Text'"
@OK='=1'
Height="<$UISAMPLE_NEWSIZE_VerifyReadyDlg.Text>" ;;Previous value = 20
>
#)
<$/Table>
#endif
;----------------------------------------------------------------------------
;--- Add Dialog Identification? MUST BE LAST THING DONE! --------------------
;----------------------------------------------------------------------------
;---[ForDoco.AddDialogNameToDialogTitle]---
#define? UISAMPLE_DIALOGS_ID_IN_TITLE.D N ;;In developer mode?
#define? UISAMPLE_DIALOGS_ID_IN_TITLE.P N ;;In production mode? - probably not!
#if ['<$UISAMPLE_DIALOGS_ID_IN_TITLE.[MMMODE]>' = 'Y']
;--- We wish to add the dialog name to the title ------------------------
<$Table "Dialog">
<$Row @Where="" @OK=^? > 0^ *Title=^"[\[]" & <$COLSTR.Dialog.Dialog> & "[\]] - " & <$COLSTR.Dialog.Title>^>
<$/Table>
#endif
;---[ForDoco.AddDialogNameToDialogTitle]---
;----------------------------------------------------------------------------
;--- HOOK after all UISAMPLE stuff done -------------------------------------
;----------------------------------------------------------------------------
#define? UISAMPLE_HOOK_FINISHED_UI_UPDATES
<$UISAMPLE_HOOK_FINISHED_UI_UPDATES>
#NextId UNLOCK "UISAMPLE.MMH"