Create a bootstrapper.  Check out msdn documentation on the msbuild 
GenerateBootstrapper task.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gareth at Serif
Sent: Thursday, March 29, 2007 10:23 AM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] How do i embedd and install a 3rd party msi (eg 
directx or wse runtime) if not already installed


I regularly install DirectX as part of my WiX packages, here's the code for a
file I just include for the functionality to 'appear':

<?xml version='1.0' encoding="utf-8"?>
<Include xmlns='http://schemas.microsoft.com/wix/2003/01/wi'>
        <Feature Id="DirectX9" Title="DirectX9" Level="100" 
Description="DirectX9"
AllowAdvertise="no" Display="hidden">
                <ComponentRef Id="DirectX9" />
        </Feature>

        <Property Id="DirectXDll">DirectX9\dsetup.dll</Property>
        <Property Id="InstallDX">No</Property>
        <CustomAction Id="SetInstallDX" Property="InstallDX" Value="Yes" />
        <CustomAction Id="MsiInstDX" BinaryKey="MsiCustomActions"
DllEntry="MsiInstDX" Impersonate="yes" />
        <CustomAction Id="MsiInstDXProp" Property="MsiInstDXDeferred"
Value="[UILevel];[SourceDir][DirectXDll]" Impersonate="yes" />
        <CustomAction Id="MsiInstDXDeferred" BinaryKey="MsiCustomActions"
DllEntry="MsiInstDX" Execute="deferred" Impersonate="yes" />

        <InstallExecuteSequence>
                <Custom Action="SetInstallDX" After="LaunchConditions">(NOT 
Installed) AND
((DXMajorVersion &lt; 4) OR (DXMajorVersion = 4 AND DXMinorVersion &lt;
9))</Custom>
                <Custom Action="MsiInstDX" After="InstallInitialize">(NOT 
Installed) AND
(InstallDX = "Yes")</Custom>
                <Custom Action="MsiInstDXProp" After="MsiInstDX">(NOT 
Installed) AND
(InstallDX = "Yes")</Custom>
                <Custom Action="MsiInstDXDeferred" After="MsiInstDXProp">(NOT 
Installed)
AND (InstallDX = "Yes")</Custom>
        </InstallExecuteSequence>

        <InstallUISequence>
                <Custom Action="SetInstallDX" After="LaunchConditions">(NOT 
Installed) AND
((DXMajorVersion &lt; 4) OR (DXMajorVersion = 4 AND DXMinorVersion &lt;
9))</Custom>
                <Custom Action='SetRebootRequired' After='SetInstallDX'>(NOT 
Installed)
AND (InstallDX = "Yes")</Custom>
        </InstallUISequence>

        <DirectoryRef Id="TARGETDIR" >
                <Directory Id="DirectX9" Name="DirectX9" 
src="Installs\Common\DirectX9c">
                        <Component Id="DirectX9" 
Guid="80A814B2-E059-4A83-9533-C9A9A694C869"
DiskId="1">
                                <File Id="DX9BDA.cab" Name="BDA.cab" 
Compressed="no" />
                                <File Id="DX9BDANT.cab" Name="BDANT.cab" 
Compressed="no" />
                                <File Id="DX9BDAXP.cab" Name="BDAXP.cab" 
Compressed="no" />
                                <File Id="DX9DirectX.cab" Name="DirectX.cab" 
Compressed="no" />
                                <File Id="DX9dsetup32.dll" Name="dsetup32.dll" 
Compressed="no" />
                                <File Id="DX9DSETUP.dll" Name="DSETUP.dll" 
Compressed="no" />
                                <File Id="DX9dxnt.cab" Name="dxnt.cab" 
Compressed="no" />
                                <File Id="DX9DXSETUP.exe" Name="DXSETUP.exe" 
Compressed="no" />
                                <File Id="DX9ManagedDX.CAB" Name="ManagdDX.CAB" 
LongName="ManagedDX.CAB"
Compressed="no" />
                        </Component>
                </Directory>
        </DirectoryRef>
</Include>

AS for other MSIs (Adobe Reader, for example) so long as there's only one to
install, you can call the MSI in a deferred custom action that'll launch
after your own installation had finished - I've done that a few times with
great success too.

Good luck,
Gareth
--
View this message in context: 
http://www.nabble.com/How-do-i-embedd-and-install-a-3rd-party-msi-%28eg-directx-or-wse-runtime%29-if-not-already-installed-tf3469351.html#a9738492
Sent from the wix-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to