Licence Dialog Enabling |
If you use the "Preferred MSI Interface for Building a Complete MSI" then the licence dialog is conditionally disabled depending on whether you appear to have a licence to display or not.
To display a licence you will need to use "wordpad", "word" or a similar word processor to produce an "rtf" formatted file.
Method 1 - .VER file |
Probably the easiest way to specify a licence file is via the "licence" keyword in the product information section.
Please note that I use the english spelling "licence" and not "license".
Method 2 - ".licence.rtf" file |
If a licence file matching the name defined in the "COMPANY_LICENCE_NAME" macro exists then this will be used. By default this is defined such that if you have a "TryMe.MM" file then it will look for a licence file of "TryMe.licence.rtf".
You should not try to use both methods of specifying the licence file otherwise a warning message (and return code) will be generated.
The main options related to the searching for a licence file are:
#define? COMPANY_LICENCE_SPELLING_C_OR_S c ;;Spelling - Licence OR License? #define? COMPANY_LOOK_FOR_LICENCE_FILE Y ;;Y/N - Look for file or just use if supplied? #define? COMPANY_PREPROCESS_LICENCE_FILE N ;;Y/N - Does sthe file contain macros or decisions etc? #define? COMPANY_LICENCE_EXTN .licen<$COMPANY_LICENCE_SPELLING_C_OR_S>e.rtf ;;US spelling? #define? COMPANY_LICENCE_NAME <?InputFile $$FilePart:w><$COMPANY_LICENCE_EXTN>
Please see the "options for commands" section of the manual.
Administration Install Sequence |
The licence doesn't normally appear during an administrative install, if you want the same license details to appear between the "AdminWelcomeDlg" and "AdminInstallPointDlg" dialogs then the following code does this by:
I used the "Using ORCA and MSIDIFF to Automate MSI Updates" procedure to produce this output (slightly reorganised to aid clarity) which you should be able to append to your script:
;#include "OpenMsi.MMH" ;<$Msi 'C:\Program Files\MakeMsi\Samples\TryMe\DB$\2009-05-14 - licence\out\TryMe.MM\MSI\AdminSequenceWithLicence.msi' Template='C:\Program Files\MakeMsi\Samples\TryMe\DB$\2009-05-14 - licence\out\TryMe.MM\MSI\Before.msi'> <$Table "AdminUISequence"> #( <$Row Action="ItsAdmin" ;;Set my "ITSADMIN" property Condition="" Sequence="10" > #) <$/Table> <$Table "CustomAction"> #( <$Row Action="ItsAdmin" Type="51" Source="ITSADMIN" ;;My new property Target="Y" ;;Make its value "Y" ExtendedType="" > #) <$/Table> <$Table "ControlEvent"> <$RowsDelete WHERE="`Dialog_` = 'AdminWelcomeDlg' AND `Control_` = 'Next' AND `Event` = 'NewDialog' AND `Argument` = 'AdminInstallPointDlg' AND `Condition` = '1'"> <$RowsDelete WHERE="`Dialog_` = 'AdminInstallPointDlg' AND `Control_` = 'Back' AND `Event` = 'NewDialog' AND `Argument` = 'AdminWelcomeDlg' AND `Condition` = '1'"> #( <$Row Dialog_="AdminWelcomeDlg" Control_="Next" Event="NewDialog" Argument="LicenseAgreementDlg" Condition="1" Ordering="2" > #) #( <$Row Dialog_="AdminInstallPointDlg" Control_="Back" Event="NewDialog" Argument="LicenseAgreementDlg" Condition="1" Ordering="" > #) <$RowsDelete WHERE=^`Dialog_` = 'LicenseAgreementDlg' AND `Control_` = 'Next' AND `Event` = 'NewDialog' AND `Argument` = 'SetupTypeDlg' AND `Condition` = 'IAgree = "Yes"'^> #( <$Row Dialog_="LicenseAgreementDlg" Control_="Next" Event="NewDialog" Argument="AdminInstallPointDlg" Condition='(ITSADMIN = "Y") and (IAgree = "Yes")' Ordering="" > #) #( <$Row Dialog_="LicenseAgreementDlg" Control_="Next" Event="NewDialog" Argument="SetupTypeDlg" Condition='(ITSADMIN <> "Y") and (IAgree = "Yes")' Ordering="1" > #) <$RowsDelete WHERE="`Dialog_` = 'LicenseAgreementDlg' AND `Control_` = 'Back' AND `Event` = 'NewDialog' AND `Argument` = 'WelcomeDlg' AND `Condition` = '1'"> #( <$Row Dialog_="LicenseAgreementDlg" Control_="Back" Event="NewDialog" Argument="AdminWelcomeDlg" Condition='ITSADMIN = "Y"' Ordering="" > #) #( <$Row Dialog_="LicenseAgreementDlg" Control_="Back" Event="NewDialog" Argument="WelcomeDlg" Condition='ITSADMIN <> "Y"' Ordering="" > #) <$/Table> ;<$/Msi>