Short Answer: My guess is that an in-use file (locked) has caused the scheduling of an automatic reboot prompt to appear. Locked files are almost always the
cause of such problems and the prompt is a built-in feature of MSI itself. The file in-use could be a service file that is not shut down
properly (timeout or design errors in the MSI). Some details below. You should enable logging to work out what triggered the reboot prompt
.
Docs Microsoft: Logging of Reboot Requests. Sample from log file:
Info 1603. The file E:\testdb\Test\CustAct2.dll is being held in use.
Info 1903.Scheduling reboot operation: Deleting file [filename]. Must
reboot to complete operation.
Logging: You should enable logging to work out what triggered the reboot prompt. Here is an answer on logging: Enable installation logs for MSI installer without any command line arguments. You can 1)
enable the logging policy and then you can find a log for each uninstall that is run in the TEMP folder. 2)
You can also invoke the uninstall with msiexec.exe /x
and specify a logging location there in the command line. See the linked answer for details.
Uninstall Logging: See section 3 here for uninstall logging commands: Uninstalling an MSI file from the command line without using msiexec
msiexec.exe /x "c:\filename.msi" /QN /L*V "C:\msilog.log" REBOOT=ReallySuppress
msiexec.exe /x {11111111-1111-1111-1111-11111111111X} /QN /L*V "C:\msilog.log" REBOOT=ReallySuppress
Reboot Prompt Cause: Most likely the cause of the reboot prompt is a file that is in use and hence could not be removed. MSI has auto-magic features to then trigger a reboot to replace or remove the file. A restart makes that possible. There are also many other potential causes for the reboot prompt. You could have stuff registered that needs a reboot to properly unregister. Along the same lines as files in use, but it could involve all kinds of registration system-wide.
Services: A special case of files in use are services. Do you have any in your setup? Very often the reboot prompt is caused by the service not shutting down properly. This can be because of timing issues (it is too slow to stop) or there are no proper commands in the setup for uninstallation scenarios to stop the service as it should on uninstall.
REINSTALLMODE: Note that setting the REINSTALLMODE property to "amus"
- force overwrite (files and registry) - has shown itself to lead to many more reboot prompts for many MSI packages on installation (can affect uninstall too, though I don't see it set so often for uninstall).
Restart Manager: There are new features in Windows to deal with the problems of rebooting. The overall idea is to prefer to shut down applications auto-magically with a restart parameter registered for the application to restart itself after the deployment operation - rather than triggering system reboots
. There is information about this feature here: