我无法获得带有自定义托管引导程序应用程序的刻录软件包,无法在Windows映像组件附带的某些平台上启动,而Windows映像组件是安装.NET 4.0所必需的(Windows 2003就是其中之一)。 / p>
我们使用标准方法来定义托管引导程序应用程序所需的内容:
<WixVariable Id="WixMbaPrereqPackageId" Value="Netfx4Full"/>
当在新安装的Windows 2003 R2计算机上运行此引导程序时,它会启动.NET的标准需求安装程序,然后失败并显示错误。
我们尝试通过执行以下操作解决此问题(所有非必要剪切):
...
<!-- Define WIC packages -->
<PackageGroup Id="PG.WIC">
...
<ExePackage Id="EP.wic_x64_enu" Cache="no" Compressed="no" PerMachine="yes" Permanent="yes" Vital="no"
DisplayName="Windows Imaging Component for Windows Server 2003 x64"
Name="{4A85FFDB-5563-4FE9-9C0E-C780A271BCC7}\WIC\wic_x64_enu.exe"
SourceFile="$(var.SetupPrereq_SRC)\WindowsImagingComponent\x64\wic_x64_enu.exe"
DownloadUrl="http://download.microsoft.com/download/6/4/5/645fed5f-a6e7-44d9-9d10-fe83348796b0/wic_x64_enu.exe"
InstallCondition="(VersionNT=v5.2 AND VersionNT64 AND NOT NETFRAMEWORK40FULL)"
InstallCommand="/q /norestart">
</ExePackage>
</PackageGroup>
...
<!-- Define our own .NET package, and set it to be after the WIC package -->
<PackageGroup Id="PG.NetFx40Full">
<ExePackage Id="EP.NetFx40Full" Cache="no" Compressed="no" PerMachine="yes" Permanent="yes" Vital="yes" Protocol="netfx4"
DisplayName="Microsoft .NET Framework 4"
Name="{4A85FFDB-5563-4FE9-9C0E-C780A271BCC7}\NetFx\dotNetFx40_Full_x86_x64.exe"
SourceFile="$(var.SetupPrereq_SRC)\NetFx\dotNetFx40_Full_x86_x64.exe"
DownloadUrl="http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe"
DetectCondition="NETFRAMEWORK40FULL"
InstallCommand="/q /norestart /ChainingPackage "[WixBundleName]" /log %TEMP%\PG.NetFx40Full.log"
RepairCommand="/q /norestart /repair /ChainingPackage "[WixBundleName]""
After="EP.wic_x64_enu" >
</ExePackage>
</PackageGroup>
...
<!-- Change wixmbaprereqpackageid to point to our own package-->
<WixVariable Id="WixMbaPrereqPackageId" Value="PG.Netfx4Full" Overridable="no"/>
<WixVariable Id="WixMbaPrereqLicenseUrl" Value="NetfxLicense.rtf" />
...
<Chain>
<!--Windows Imaging Component-->
<PackageGroupRef Id="PG.WIC"/>
<!--.Net Framework 4 -->
<!--Custom offline package.-->
<PackageGroupRef Id="PG.NetFx40Full"/>
...
</Chain>
...
这不起作用。 prereq安装程序照常启动,但是当您单击按钮开始安装时,进度条会闪烁一秒钟,安装程序将退出。如果再次启动软件包,则prereq安装程序将启动,但仅显示标题和徽标,但不显示按钮。我们还尝试将After条件放在.NET包组的PackageGroupRef上,结果类似。
所以,我的问题是:有没有办法让刻录安装多个包作为托管引导程序的先决条件,还是有其他方法可以解决这个问题?
答案 0 :(得分:2)
使用WiX v3.9及更高版本,将bal:PrereqSupportPackage="yes"
(在v4.x中bal:PrereqPackage
)添加到您希望安装prereq BA的软件包中(它尊重InstallCondition)
答案 1 :(得分:0)
您可以使用dotNetInstaller,它是Windows的安装引导程序。 安装wic后(在x86或x64上),您可以启动Wix安装程序。
以下是您可以在dotNetInstaller configuration.xml 中使用的一些代码 有三个组件:wic_x86,wic_x64和dot Net framework 4
<component executable=""#CABPATH\wic_x86_enu.exe" /norestart /quiet" executable_silent="" executable_basic="" install_directory="" responsefile_source="" responsefile_target="" responsefile_format="none" uninstall_executable="" uninstall_executable_silent="" uninstall_executable_basic="" uninstall_responsefile_source="" uninstall_responsefile_target="" returncodes_success="" returncodes_reboot="" exeparameters="" exeparameters_basic="" exeparameters_silent="" uninstall_exeparameters="" uninstall_exeparameters_basic="" uninstall_exeparameters_silent="" disable_wow64_fs_redirection="False" id="Windows Imaging Component (x86)" display_name="Windows Imaging Component" uninstall_display_name="" os_filter="" os_filter_min="winXP" os_filter_max="" os_filter_lcid="" type="exe" installcompletemessage="" uninstallcompletemessage="" mustreboot="False" reboot_required="" must_reboot_required="False" failed_exec_command_continue="" allow_continue_on_error="False" default_continue_on_error="False" required_install="True" required_uninstall="True" selected_install="True" selected_uninstall="True" note="" processor_architecture_filter="x86" status_installed="" status_notinstalled="" supports_install="True" supports_uninstall="False" show_progress_dialog="True" show_cab_dialog="True">
<embedfile sourcefilepath="#APPPATH\presetup\wic_x86_enu.exe" targetfilepath="#TEMPPATH\wic_x86_enu.exe" />
<installedcheck filename="#SYSTEMPATH\WindowsCodecs.dll" fileversion="" comparison="exists" defaultvalue="False" type="check_file" description="Installed Check" />
</component>
<component executable=""#CABPATH\wic_x64_enu.exe" /norestart /quiet" executable_silent="" executable_basic="" install_directory="" responsefile_source="" responsefile_target="" responsefile_format="none" uninstall_executable="" uninstall_executable_silent="" uninstall_executable_basic="" uninstall_responsefile_source="" uninstall_responsefile_target="" returncodes_success="" returncodes_reboot="" exeparameters="" exeparameters_basic="" exeparameters_silent="" uninstall_exeparameters="" uninstall_exeparameters_basic="" uninstall_exeparameters_silent="" disable_wow64_fs_redirection="False" id="Windows Imaging Component (x64)" display_name="Windows Imaging Component" uninstall_display_name="" os_filter="" os_filter_min="winXP" os_filter_max="" os_filter_lcid="" type="exe" installcompletemessage="" uninstallcompletemessage="" mustreboot="False" reboot_required="" must_reboot_required="False" failed_exec_command_continue="" allow_continue_on_error="False" default_continue_on_error="False" required_install="True" required_uninstall="True" selected_install="True" selected_uninstall="True" note="" processor_architecture_filter="x64" status_installed="" status_notinstalled="" supports_install="True" supports_uninstall="False" show_progress_dialog="True" show_cab_dialog="True">
<embedfile sourcefilepath="#APPPATH\presetup\wic_x64_enu.exe" targetfilepath="#TEMPPATH\wic_x64_enu.exe" />
<installedcheck filename="#SYSTEMPATH\WindowsCodecs.dll" fileversion="" comparison="exists" defaultvalue="False" type="check_file" description="Installed Check" />
</component>
<component executable=""#CABPATH\dotNetFx40_Full_x86_x64.exe" /norestart /quiet" executable_silent="" executable_basic="" install_directory="" responsefile_source="" responsefile_target="" responsefile_format="none" uninstall_executable="" uninstall_executable_silent="" uninstall_executable_basic="" uninstall_responsefile_source="" uninstall_responsefile_target="" returncodes_success="" returncodes_reboot="3010" exeparameters="" exeparameters_basic="" exeparameters_silent="" uninstall_exeparameters="" uninstall_exeparameters_basic="" uninstall_exeparameters_silent="" disable_wow64_fs_redirection="False" id=".NET Framework 4 (English)" display_name="Microsoft .NET Framework 4" uninstall_display_name="" os_filter="" os_filter_min="winXP" os_filter_max="" os_filter_lcid="" type="exe" installcompletemessage="" uninstallcompletemessage="" mustreboot="False" reboot_required="" must_reboot_required="False" failed_exec_command_continue="" allow_continue_on_error="False" default_continue_on_error="False" required_install="True" required_uninstall="True" selected_install="True" selected_uninstall="True" note="" processor_architecture_filter="" status_installed="" status_notinstalled="" supports_install="True" supports_uninstall="False" show_progress_dialog="True" show_cab_dialog="True">
<installedcheck path="SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" fieldname="Install" fieldvalue="1" defaultvalue="False" fieldtype="REG_DWORD" comparison="match" rootkey="HKEY_LOCAL_MACHINE" wowoption="NONE" type="check_registry_value" description="Installed Check" />
<embedfile sourcefilepath="#APPPATH\presetup\dotNetFx40_Full_x86_x64.exe" targetfilepath="#TEMPPATH\dotNetFx40_Full_x86_x64.exe" />
</component>