我正在通过自定义操作使用WiX安装程序安装WDF驱动程序 使用API DriverPackageInstall。但失败,错误为“ 0x80030005” STG_E_ACCESSDENIED。 我以管理员身份运行(假设没有权限问题) 创建了能够成功安装驱动程序的测试“ c”控制台应用程序。
<InstallExecuteSequence>
<Custom Action='UninstallDriver'
After='InstallInitialize'>
REMOVE~="ALL" OR REINSTALL</Custom>
</InstallExecuteSequence>
<CustomAction Id='UninstallDriver'
BinaryKey='install_lib'
DllEntry='InstallDriver'
Execute='deferred'
Impersonate="no"
Return='check'/>
无法弄清楚为什么会失败 启用完整日志并进行检查。
MSI (s) (E8:50) [11:56:09:296]: Invoking remote custom action. DLL: C:\Windows\Installer\XXXXXX.tmp, Entrypoint: InstallMyDriver
CustomAction InstallMY.XXXXX_9XX_XXXX_XXXX_XXXXXXXX returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 11:56:10: InstallFinalize. Return value 3.
MSI (s) (E8:38) [11:56:10:144]: Note: 1: 2265 2: 3: -2147287035
MSI (s) (E8:38) [11:56:10:144]: User policy value 'DisableRollback' is 0
MSI (s) (E8:38) [11:56:10:144]: Machine policy value 'DisableRollback' is 0
检查到的INF文件位于预期的输入位置。
任何帮助表示赞赏。
答案 0 :(得分:1)
相似答案 :WiX silent install unable to launch built in .EXE: WiX v3
驱动程序元素 :为什么不使用WiX内置的 difx:Driver element / construct ?我想知道您是否有系统上下文/模拟问题?通过使用内置的驱动程序元素,您可以避免“手动”操作时发生的某些常见问题,从而获得更多的“ 自动魔术”。
爆炸过去 :这是前面的答案,简洁地描述了此元素。不幸的是,我自己无法对其进行正确测试: How do I use WiX to deploy an INF-based USB driver Plus all the start menu shortcuts and desktop icons
测试 :我肯定会尝试一下此元素,只需注释掉您现有的自定义操作并尝试一下即可。
<Component>
<File ... />
<difx:Driver ... />
</Component>