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]: REMOVE[Next]: Version9X
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Windows Installer Basics->Properties->Specific Properties->SourceDir

SourceDir

During an install this property points to the directory the MSI is being installed from. It is not normally available during other maintenance type operations unless the standard "ResolveSource" action has been executed.

It is best to avoid the use of "SourceDir" whenever possible as the "ResolveSource" custom action will require that the original MSI be available during maintenance operations, if it is missing then a very ugly and unfriendly Windows Installer dialog will be displayed (see "Source Availability" for more information).

Note that you may require the "SourceDir" to be available depending on chosen options if you have used the "MsiExtraFiles" command.

Please see Microsoft's online documentation for the "SourceDir" property (or "MSI.CHM") for more information.

COMPANY.MMH Support

The following shows some available options plus a code fragment from "COMPANY.MMH":

;----------------------------------------------------------------------------
;--- Add "ResolveSource" action ---------------------------------------------
;----------------------------------------------------------------------------
#define? COMPANY_INSERT_ResolveSourceAction  N
#if ['<$COMPANY_INSERT_ResolveSourceAction>' = 'Y']
    ;--- We do wish to insert the "ResolveSource" action --------------------
    #define COMPANY_RESOLVE_SOURCE_CONDITION   <$CONDITION_EXCEPT_UNINSTALL>
    #(
        #define ResolveSource           ;;Note that the SOURCE MSI MUST BE AVAILABLE (for example can't eneter maintenance mode if MSI gone...)
        <$Table "{$#1}">
        #(
            ;--- Need to do this or "SourceDir" null if UI=none or basic --------
            #ifndef @@RsSeqNumber
                ;--- Only declare variable once ---------------------------------
                dim RsSeqNumber<?NewLine>
                #define @@RsSeqNumber
            #endif
            RsSeqNumber = GetSeqNumber("{$#1}", "CostInitialize-CostFinalize", 1)
            <$Row
                  Action="ResolveSource"                        ;;Set up the "sourceDir" property/directory
               Condition=^<$COMPANY_RESOLVE_SOURCE_CONDITION>^  ;;Don't want during uninstall etc (may require source media, CD etc)
               *Sequence=^RsSeqNumber^                          ;;Use Sequence number determined earlier
            >
        #)
        <$/Table>
    #)
    <$ResolveSource "InstallUISequence">
    <$ResolveSource "InstallExecuteSequence">
#endif

Please see the "options for commands" section of the manual.


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006 & 2007 for the Windows SDK (Windows Installer) area.This external link was OK when tested at 12 Jun 2008Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: REMOVE[Next]: Version9X


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Wednesday June 25 2008 at 7:16pm
Visit MAKEMSI's Home PageThis external link was OK when tested at 21 Jun 2008

HTML page dated Mon, 29 Jan 2007 00:11:11 GMT
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006 & 2007 for the Windows SDK (Windows Installer) area.This external link was OK when tested at 12 Jun 2008