0

Kind time of the day! I'm working on creating an msi installer using the wix toolkit. It was required to run exe from under the msi installer. Here is my code:

<Binary Id="JDK_EXE" src="..\..\jdk\jdk-6u45-windows-i586.exe"/>

<CustomAction Id="RunJavaJDKInstall"
              BinaryKey="JDK_EXE"
              ExeCommand="" 
              Return="check"/>
<InstallExecuteSequence>
  <Custom Action ="RunJavaJDKInstall" After="InstallInitialize"></Custom>
</InstallExecuteSequence>

The question is what to write in the ExeCommand tag to run jdk-6u45-windows-i586.exe on execution?

Yaroslav
  • 1
  • 1
  • 5
  • Orhan mentions Burn, the WiX sequencer / bootstrapper / downloader component. [Maybe have a quick read about Burn here](https://stackoverflow.com/a/52349744/129130) to learn more about it. You can use it to install java as a prerequisite for your MSI. – Stein Åsmul Sep 19 '18 at 23:38

1 Answers1

0

You cant make in msı project but you can make it with wix bootstrapper project like this.

<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />

   <util:RegistrySearch Root="HKLM"
                     Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full"
                     Value="Version"
                     Variable="Netfx4FullVersion" />
  <util:RegistrySearch Root="HKLM"
                     Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full"
                     Value="Version"
                     Variable="Netfx4x64FullVersion"
                     Win64="yes" />
<Chain>


    <!--   <PackageGroupRef Id="Net47"/>-->   
    <ExePackage Id="Net45" Name="Microsoft .NET Framework 4.5.1 Setup" Cache="no" Compressed="yes" PerMachine="yes" Permanent="yes" Vital="yes" InstallCommand="/q"
    SourceFile=".\prerequisites\NNDP47-KB3186497-x86-x64-AllOS-ENU.exe"
    DetectCondition="(Net4FullVersion = &quot;4.5.50938&quot;) AND (NOT VersionNT64 OR (Net4x64FullVersion = &quot;4.5.50938&quot;))"
    InstallCondition="(VersionNT >= v6.0 OR VersionNT64 >= v6.0) AND (NOT (Net4FullVersion = &quot;4.5.50938&quot; OR Net4x64FullVersion = &quot;4.5.50938&quot;))"/>

  <ExePackage Id="Netfx4Full"
              DisplayName="Microsoft .NET Framework 4.0"
              Compressed="yes"
              Cache="yes"
              PerMachine="yes"
              Permanent="yes"
              Protocol="netfx4"
              Vital="yes"
              SourceFile=".\prerequisites\NNDP47-KB3186497-x86-x64-AllOS-ENU.exe"
              InstallCommand="/passive /norestart"
              DetectCondition="(Net4FullVersion = &quot;4.5.50938&quot;) AND (NOT VersionNT64 OR (Net4x64FullVersion = &quot;4.5.50938&quot;))"
              InstallCondition="(VersionNT &lt; v6.0 OR VersionNT64 &lt; v6.0) AND (NOT (Net4FullVersion OR Net4x64FullVersion))" />
  <RollbackBoundary />
          <!--   <PackageGroupRef Id="SQLExpressCE"/> Install Application  NetVersion >= 460798-->
  <MsiPackage Id="MyApplication" SourceFile="$(var.SetupProject1.TargetPath)" DisplayInternalUI="yes" Compressed="yes" Vital="yes"/>

  </Chain>
</Bundle>
Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
ORHAN TOPDAĞ
  • 157
  • 1
  • 1
  • 11