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

COMPANY_WANT_TO_INSTALL_DOCUMENTATION

Please see the "options for commands" section of this manual for general information about the use of macros for configuration.

By default this macro has a value of "Y" which means that the generated HTML should be added to the MSI for installation. Set this to "N" to prevent this.

To also prevent the generation of the documentation in the first place see the "ONEXIT_GENERATE_HTML".

POSSIBLE ISSUE: Microsoft's Media Table Validation

Its possible that the generated documentation was previously the only file being installed in which cause you might get a validation message like:

ICE71        WARNING   The Media table has no entries.

To remove this add this line to your script:

<$MsiValFilter "The Media table has no entries">

Relevant code in "COMPANY.MMH"

This shows the relevant code (in "Company.MMH") and the options available:

;----------------------------------------------------------------------------
;--- We wish to add the generated documentation to the MSI ------------------
;----------------------------------------------------------------------------
#if ['<$ONEXIT_GENERATE_HTML>' = 'N']
    ;--- We didn't create any documentation (so nothing to add!) ------------
    #define? @@COMPANY_ADD_GENERATED_DOCO
    #define+ MSI_COMPLETE_AT_END_OF_PASS     1      ;;No need for 2nd pass if not adding the doco!
#elseif
    ;--- We did generate the documentation ----------------------------------
    #define? COMPANY_WANT_TO_INSTALL_DOCUMENTATION   Y
    #if ['<$COMPANY_WANT_TO_INSTALL_DOCUMENTATION>' = 'N']
        ;--- We have been told not to add the documenation to the MSI -------
        #define+ MSI_COMPLETE_AT_END_OF_PASS     1      ;;No need for 2nd pass if not adding the doco!
        #define? @@COMPANY_ADD_GENERATED_DOCO
    #elseif
        ;--- User wants us the add the documentation to the MSI -------------
        #define? COMPANY_DOCO_BASE_DIR                c:\Program Files\
        #define? COMPANY_DOCO_ADD2_BASE_DIR           MAKEMSI Package Documentation\
        #define? COMPANY_DOCO_RELATIVE_DIR            <$COMPANY_NAME>\<$DEPT_NAME>
        #define? COMPANY_HTMLRPT_DOCO_INSTALL_DIR     <$COMPANY_DOCO_BASE_DIR><$COMPANY_DOCO_ADD2_BASE_DIR><$COMPANY_DOCO_RELATIVE_DIR>
        #define? COMPANY_HTMLRPT_DOCO_COMPONENTS_GUID *             ;;Ramdom one is fine...
        #ifndef  COMPANY_HTMLRPT_DOCO_INSTALL_DIR_KEY
                 ;--- User didn't tell us what key to use -------------------
                 #define COMPANY_HTMLRPT_DOCO_INSTALL_DIR_KEY MAKEMSI_DOCO
                 #define @@CreateDocoKey
        #endif
        #define? COMPANY_HTMLRPT_NAME_LONG            <$MSI_HTMLNAME $$FilePart:NAME>   ;;Alternative = "<$ProdInfo.ProductName>(<$ProductVersion>).hta"
        #define? COMPANY_HTMLRPT_NAME_8.3             MSIRPT.HTA
        #ifndef  COMPANY_COMPLETE_FEATURE
            ;--- Don't have a complete feature ------------------------------
            #define? COMPANY_HTMLRPT_FEATURE      ;;User will have to tell us!
        #elseif
            ;--- We know where we can add it! -------------------------------
            #define? COMPANY_HTMLRPT_FEATURE      <$COMPANY_COMPLETE_FEATURE>
        #endif
        #if ['<$COMPANY_HTMLRPT_FEATURE>' = '']
            #error ^To add the HTML to the MSI we need to know the name of a feature, as{NL}you have turned off the "complete" feature you must supply this name in{NL}the "COMPANY_HTMLRPT_FEATURE" macro!^
        #endif
        #(
           #define? @@COMPANY_ADD_GENERATED_DOCO

           <$HookInto "MAKEMSI_HOOK_SECOND_PASS_PROCESSING" After="@@AddDocumentationToTheMsi">
        #)
        #(
            #define @@AddDocumentationToTheMsi

            ;--- Add later in case directory not yet known -------------------
            #ifdef @@CreateDocoKey
                  <$DirectoryTree Key="<$COMPANY_HTMLRPT_DOCO_INSTALL_DIR_KEY>" Dir="<$COMPANY_HTMLRPT_DOCO_INSTALL_DIR>">
            #endif

            ;--- Define the file row ----------------------------------------
            <$Component "<$FILE_HTMLRPT_ROWKEY>" Create="Y" Directory_="<$COMPANY_HTMLRPT_DOCO_INSTALL_DIR_KEY>" Feature=^<$COMPANY_HTMLRPT_FEATURE>^ ComponentId=^<$COMPANY_HTMLRPT_DOCO_COMPONENTS_GUID>^ CU="?">
               ;--- Add the generated doco ----------------------------------
               <$Cabinet "[Pass2Doco]" Cache="N">
               #(
                   ;--- Note that the doco has not yet actually been generated! ---
                   <$File
                       RowKey="<$FILE_HTMLRPT_ROWKEY>"    ;;Marks as special case
                       Source="<$MSI_HTMLNAME>"
                   Destination="<$COMPANY_HTMLRPT_NAME_LONG>"
                           8.3="<$COMPANY_HTMLRPT_NAME_8.3>"                ;;Must supply one! - May change VBS to fix up...
                           HASH="N"
                       Language="<$DEFAULT_FILE_LANG_WHEN_GETLANGUAGE_FAILS>"
                       Version=""
                          DOCO="N"               ;;too late for that!
                   >
               #)
               <$/Cabinet>
           <$/Component>
           #ifndef COMPANY_DONT_UPDATE_ARPREADME
               ;--- Update "Support Information" (readme) info --------------
               <$PropertyCa "ARPREADME"  VALUE=^file:///[!<$FILE_HTMLRPT_ROWKEY>]^ Seq="CostFinalize-">
           #endif
        #)
    #endif
#endif


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]: COMPANY_WANT_COMPLETE_FEATURE[Next]: COMPILE_TYPE


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Saturday May 28 2022 at 3:11pm
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.