Silent Windows Installer installer without rebooting automatically
Asked Answered
S

1

9

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?

Sihunn answered 26/9, 2011 at 17:31 Comment(0)
O
14

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.

Oberland answered 26/9, 2011 at 19:6 Comment(4)
Thanks for your answer Alexey, I just wonder where did you find this information, because in Windows Installer documentation (msdn.microsoft.com/en-us/library/windows/desktop/…) I couldn't find anything like this. Regards!Sall
@Santiago Yes, this page does not mention it. Yet it's the way it works. It comes from experience.Oberland
@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. In Windows 7, Windows Installer uses Restart Manager to prevent system restart where it can safely avoid it.Oberland
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.Marleenmarlen

© 2022 - 2024 — McMap. All rights reserved.