Wix - Create a mock installer that requires a reboot (returns 3010)

萝らか妹 提交于 2019-12-12 11:27:43

问题


I'm interested in creating a mock wix installer which can be used to simulate an installation that returns error code 3010. Is there a way to get a wix installation to easily return a specific error code. Would simply returning 3010 from a custom action work? or would that just be a failed custom action?

Any suggestions welcome! Thanks Ben


回答1:


Despite searching on SO before posting, I have subsequently found this answer.

Is it possible to prompt for restart machine after installation using WiX?

The line:

<InstallExecuteSequence>
      <ScheduleReboot After="InstallFinalize"/>
</InstallExecuteSequence>

does the trick and returns 3010!




回答2:


How did you verify that the MSI returns 3010 ? I tried this out and the MSI just reboots at the end. I was expecting the MSI to just return 3010 and it should be upto the environment to decide whether to reboot now or later.



来源:https://stackoverflow.com/questions/8604078/wix-create-a-mock-installer-that-requires-a-reboot-returns-3010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!