7

Currently I have an MSI which performs a major upgrade, and it is launched as:

msiexec.exe /i installer.msi /qn REBOOT=ReallySuppress

My question is regarding that particular property REBOOT=ReallySuppress: does this mean it will not restart the system but will do proper changes (if applied) when user reboot her system manually? Or will it simply ignore those things that require to restart the system?

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Santiago Agüero
  • 2,933
  • 7
  • 23
  • 36

1 Answers1

11

The installer performs all the operations. The value ReallySuppress of REBOOT property, or /norestart option, simply suppress system restart, if it's needed. And msiexec.exe exit code would be 3010 (ERROR_SUCCESS_REBOOT_REQUIRED) to indicate to the calling application that system restart is required.

The files that were in use during installation will have been moved out of the way and will be permanently deleted when system restarts. It is recommended to restart the system as soon as possible because until then some processes will be using the old (locked) files whereas new processes will be using the new, updated files, so there is room for ambiguity, especially since there may be registry changes as well. As such the /noreboot option is useful when you have several packages to install and you want to reboot after the last one, but only if it's absolutely necessary. Just ignoring the reboot prompt is not a good way to go.

Stephen Connolly
  • 1,599
  • 9
  • 15
Alexey Ivanov
  • 10,757
  • 4
  • 36
  • 58
  • Thanks for your answer Alexey, I just wonder where did you find this information, because in Windows Installer documentation (http://msdn.microsoft.com/en-us/library/windows/desktop/aa372024(v=vs.85).aspx) I couldn't find anything like this. Regards! – Santiago Agüero Sep 27 '11 at 12:39
  • @Santiago Yes, this page does not mention it. Yet it's the way it works. It comes from experience. – Alexey Ivanov Sep 27 '11 at 16:12
  • 1
    @Stephen I agree that Windows Installer can replace files in use, yet it usually does not because of the ambiguity between DLL versions. If it replaced, then reboot would not be required. Raymond Chen explains [why Windows will not replace files in use](http://technet.microsoft.com/en-us/magazine/2008.11.windowsconfidential.aspx "Windows Can but Won’t"). In Windows 7, Windows Installer uses *Restart Manager* to prevent system restart where it can *safely* avoid it. – Alexey Ivanov Sep 27 '11 at 16:21
  • 1
    Windows installer *will* replace in use files where they are encountered, scheduling a reboot unless you actively suppress it. However If you are using the RestartManager then the situation is managed better since in use files will be unlocked by shutting down any processes that are consuming them. RM doesn't prevent reboots, though, it just helps to avoid them. – Stephen Connolly Sep 28 '11 at 11:07