繁体   English   中英

如何在MSI中运行exe?

[英]How to run exe inside msi?

一天的美好时光! 我正在使用wix工具包创建一个msi安装程序。 需要从msi安装程序下运行exe。 这是我的代码:

<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>

问题是在ExeCommand标记中写什么以在执行时运行jdk-6u45-windows-i586.exe?

您不能在msı项目中进行创建,但可以使用wix bootstrapper项目来进行创建。

<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>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM