How to silence the launch of the installer of another program (PostgreSQL) during installation on WIX?

My company is developing an application that is dependent on PostgreSQL, we are developing an installer using WIX. How can we make the PostgreSQL installer (which is also an msi file) run automatically when our application is installed? What do we need to install on Wix? If you know a webpage explains this, send the link. Thank!

+3
source share
3 answers

One Windows Installer session cannot start another, so one msi cannot install another msi. So you need to make a third application, a bootloader that installs both MSI files.

To create such a bootloader, you can use msbuild generatebootstrapper . The wix documentation already describes how to use this task to create a bootloader that installs the .NET platform. See How to install the .NET Framework using a boot device . It uses predefined bootstrapper packages for the .NET platform.

bootstrapper MSI PostgreSQL. - bootstrapper C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\ ( , Windows SDK) XML- Bootstrapper. bootstrapper generator.

, . dotNetInstaller, . , .

+3

, , MSXML 6 . - , , , , : http://msdn.microsoft.com/en-us/library/aa730839%28VS.80%29.aspx

, , , @Arguments Command, , , :

<Command PackageFile="PostgreSQL.msi" Arugments="/quiet"/>

ProductCode MSI ( MS Orca), , , PostgreSQL :

<InstallChecks>
  <MsiProductCheck 
      Property="IsPostgresInstalled" 
      Product="{PRODUCT-CODE-OF-POSTGRESQL-MSI}"/> 
</InstallChecks>

product.xml:

<Product
    xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
    ProductCode="Microsoft.MSXML.6.SP2">

  <PackageFiles>
    <PackageFile Name="msxml6-KB954459-enu-x86.exe"/>
  </PackageFiles>

  <InstallChecks>
    <MsiProductCheck 
        Property="IsMsiInstalled" 
        Product="{1A528690-6A2D-4BC5-B143-8C4AE8D19D96}"/>
  </InstallChecks>

  <Commands>
    <Command PackageFile="msxml6-KB954459-enu-x86.exe" Arguments="">
      <InstallConditions>
        <BypassIf 
            Property="IsMsiInstalled" 
            Compare="ValueGreaterThan" Value="0"/>
        <FailIf Property="AdminUser" 
                Compare="ValueNotEqualTo" Value="True"
                String="NotAnAdmin"/>
      </InstallConditions> 

      <ExitCodes>
        <ExitCode Value="0" Result="Success"/>
        <ExitCode Value="1641" Result="SuccessReboot"/>
        <ExitCode Value="3010" Result="SuccessReboot"/>
        <DefaultExitCode Result="Fail" String="GeneralFailure"/>
      </ExitCodes>
    </Command>
  </Commands>
</Product>

, MSBuild :

<Project ToolsVersion="3.5"
         xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <ItemGroup>
    <BootstrapperFile Include="Microsoft.MSXML.6.SP2" >
      <ProductName>Microsoft MSXML 6 SP2</ProductName>
    </BootstrapperFile>
  </ItemGroup>

  <Target Name="setup">
    <GenerateBootstrapper
        ApplicationFile="@PROJECT-EXE@"
        ApplicationName="@PROJECT@"
        BootstrapperItems="@(BootstrapperFile)"
        Path="C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper"
        ComponentsLocation="Relative"
        OutputPath="."
        Culture="de"/>
  </Target>

</Project>

, .

+4

MSI, , MSI.

0

Source: https://habr.com/ru/post/1726735/


All Articles