You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Wix Installer静默安装FTDI驱动exe包失败问题求助

问题分析与解决:WiX Bundle安装FTDI VCP驱动失败

问题背景

尝试通过WiX Installer静默安装FTDI VCP驱动的dpinst-amd64.exe,驱动解压后包含相关dll和dpinst-amd64.exe。单独在命令行执行dpinst-amd64.exe /q /se可正常完成安装,但在WiX的Bundle.wxs中配置该ExePackage时执行失败,其他关联包安装正常。

现有WiX配置

<Chain>
      <ExePackage Id="FTDIDriversInstaller"
                  SourceFile="$(var.DependencyFolder)\FTDIDrivers_Setup\dpinst-amd64.exe"
                  InstallCommand="/s /se"
                  Compressed="yes"/>
            <!--VC++ Redistributable required to ensure the ADE installer executes without errors-->
            <ExePackage Id="VCRedistributableInstaller"
                        SourceFile="$(var.DependencyFolder)\VC_redist.x64.exe"
                        InstallCommand="/quiet /norestart"
                        Compressed="yes" />
<ExePackage Id="VCRedistributable2010Installer"
                        SourceFile="$(var.DependencyFolder)\VCREDIST_2010_x64.exe"
                        InstallCommand="/quiet /norestart"
                        Compressed="yes" />
            <MsiPackage Id="LicenseGeneratorInstaller"
                        SourceFile="$(var.ReleaseFolder)\!(loc.CULTURE)\FactoryToolsInstall.msi"
                        Compressed="yes"
                        DisplayInternalUI="yes" />
            <ExePackage Id="AccessDatabaseEngineInstaller"
                        SourceFile="$(var.DependencyFolder)\AccessDatabaseEngine_X64.exe"
                        InstallCommand="/quiet"
                        Compressed="yes" />
                                
        </Chain>

错误日志关键信息

  • WiX将dpinst-amd64.exe单独缓存到C:\ProgramData\Package Cache\A6D6831A4A097BD47AF267727A4AD6B38B14CDE3\dpinst-amd64.exe
  • 执行时返回错误码0x80000000,随后移除缓存文件

问题原因与解决步骤

1. 修正命令行参数

现有配置中InstallCommand使用了/s /se,但/s并非dpinst的标准静默参数,单独执行时有效的参数为/q /se。替换参数:

InstallCommand="/q /se"

2. 补充驱动依赖文件

dpinst-amd64.exe需要同目录下的驱动dll(如ftdibus.dll、ftdiport.dll等)才能正常运行,但WiX默认只会提取指定的dpinst-amd64.exe到缓存目录,导致执行时找不到依赖文件。

解决方法:将驱动文件夹内的所有依赖文件作为Payload添加到ExePackage中,确保它们和dpinst-amd64.exe被缓存到同一目录:

<ExePackage Id="FTDIDriversInstaller"
            SourceFile="$(var.DependencyFolder)\FTDIDrivers_Setup\dpinst-amd64.exe"
            InstallCommand="/q /se"
            Compressed="yes">
  <!-- 添加所有驱动文件夹内的必要文件 -->
  <Payload SourceFile="$(var.DependencyFolder)\FTDIDrivers_Setup\ftdibus.dll" />
  <Payload SourceFile="$(var.DependencyFolder)\FTDIDrivers_Setup\ftdiport.dll" />
  <Payload SourceFile="$(var.DependencyFolder)\FTDIDrivers_Setup\dpapi.dll" />
  <Payload SourceFile="$(var.DependencyFolder)\FTDIDrivers_Setup\ftdi.inf" />
  <!-- 根据实际解压后的文件列表补充其他文件 -->
</ExePackage>

若文件较多,可使用WiX的Heat工具自动生成所有文件的Payload配置,避免手动遗漏。

3. 确保管理员权限

驱动安装需要管理员权限,在Bundle节点添加Privileged="yes"属性,强制安装包以管理员权限运行:

<Bundle Name="YourProductName" Version="1.0.0.0" Manufacturer="YourCompany" UpgradeCode="YOUR-GUID-HERE" Privileged="yes">

验证

修改配置后重新编译Bundle,执行安装,检查WiX日志确认无错误返回,同时验证FTDI驱动是否正常安装。

内容的提问来源于stack exchange,提问作者nikhil

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.16 00:42:03