Search code examples
wixwindows-installershutdown

Force shutdown in MSI installer?


I'm working on a hardware driver installer/updater. Part of the installer/updater installs an updated FPGA firmware. A requirement of the card when upgrading the FPGA firmware is that the machine must be fully powered down for the firmware upgrade to take effect. I have found the schedule and force reboot properties for MSI installers, but haven't found an analogue to force or schedule a shutdown. Is there anything in msi/windows-installer/WiX to do this, or can anyone suggest a way of accomplishing this?


Solution

  • You could use the QuietExecute CA to call shutdown or write your own CA. Also be sure to set the /f for force option. Otherwise, be really careful that you give users the ability to supress this shutdown. Another thought might be to have your application tell the user that the software won't work until the hardware has been cold started instead of having the installer do it.