问题
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