[英]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 = "4.5.50938") AND (NOT VersionNT64 OR (Net4x64FullVersion = "4.5.50938"))"
InstallCondition="(VersionNT >= v6.0 OR VersionNT64 >= v6.0) AND (NOT (Net4FullVersion = "4.5.50938" OR Net4x64FullVersion = "4.5.50938"))"/>
<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 = "4.5.50938") AND (NOT VersionNT64 OR (Net4x64FullVersion = "4.5.50938"))"
InstallCondition="(VersionNT < v6.0 OR VersionNT64 < 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.