【发布时间】:2013-07-12 23:57:29
【问题描述】:
我正在使用 WiX 生成一个 MSI,它基于每个用户安装浏览器插件。我有一个自定义操作来使用 DPInst 安装驱动程序(需要提升权限)。
启用 UAC 后安装正常; Windows 显示提升提示。但是,如果我禁用了 UAC 并尝试在普通用户帐户上安装,dpinst.exe 将被生成,直到计算机死机。 (最后计数大约一千次)。
在<InstallExecuteSequence>我有:<Custom Action="Install_Drivers" After="InstallFiles">NOT Installed</Custom>
我的自定义操作是:<CustomAction Id='Install_Drivers' Execute='deferred' Directory='DRIVERS' ExeCommand='"[DRIVERS]DPinst.exe" /SW /SA' Return='ignore' Impersonate='no'/>
我有Return='ignore',因为据我所知,dpinst.exe 总是returns a non-0 code。
当 UAC 被禁用时,如何确保自定义操作正确失败?在相关说明中,当驱动程序安装失败时,我可以向用户显示自定义消息吗?
更多信息:我目前正在 Windows 7 上进行开发,但目标是 WinXP 及更高版本。
编辑查看安装日志,这些似乎是相关行:
Executing op: CacheSizeFlush(,)
Executing op: ActionStart(Name=Install_Drivers,,)
Executing op: CustomActionSchedule(Action=Install_Drivers,ActionType=3170,Source=C:\long_redacted\Drivers\,Target="C:\long_redacted_path\Drivers\DPinst.exe" /SW /SA,)
Disallowing shutdown. Shutdown counter: 0
CustomAction Install_Drivers returned actual error code 1073807364 but will be translated to success due to continue marking
我相信,关于关机的一点是,当我注销时停止安装。 (取消似乎没有任何效果)。
【问题讨论】: