问题描述
我正在通过自定义操作使用 WiX 安装程序安装 WDF 驱动程序使用 API DriverPackageInstall.但它失败并出现错误0x80030005"STG_E_ACCESSDENIED.我以管理员身份运行(假设没有权限问题)创建了能够成功安装驱动程序的测试c"控制台应用程序.
I am having WDF driver installing using WiX installer via custom actionusing API DriverPackageInstall. but its failing with error "0x80030005" STG_E_ACCESSDENIED.I am running as admin (assuming no priviledge issues)created test "c" console application that is able to install driver successfully.
<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'/>
不知道为什么会失败启用完整日志并检查.
Not able to figure why is it failing enabled full logs and checked.
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 文件存在于预期的输入位置.
Checked INF file is present at expected input location.
任何帮助表示赞赏.
推荐答案
驱动程序元素:为什么不使用 WiX 的内置 difx:Driver 元素/构造?我想知道您是否有系统上下文/模拟问题?通过使用内置驱动程序元素,您可以获得更多自动魔术",因为您可以避免手动"操作时出现的某些常见问题.
Driver element: Why do you not use WiX's built-in difx:Driver element / construct? I am wondering if you have a system context / impersonation problem? By using the built-in driver element you get more "auto-magic" in the sense that you can avoid certain common problems that occur when you do things "manually".
Blast From The Past:这是之前的回答,简洁地描述了这个元素.不幸的是,我自己无法正确测试它:如何使用 WiX 部署基于 INF 的 USB 驱动程序加上所有开始菜单快捷方式和桌面图标
测试:我肯定会尝试一下这个元素,只需注释掉您现有的自定义操作并尝试一下.
Testing: I would definitely give this element a try, just comment out your existing custom actions and give it a try.
<Component>
<File ... />
<difx:Driver ... />
</Component>
- Github.com 搜索结果显示使用 difX 元素的项目(和 其中之一的直接链接).
- 在 wix 安装程序中使用 cutomAction DriverPackageInstall 安装驱动
这篇关于CustomAction DriverPackageInstall 失败,0x80030005的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!