SDutt
Posts: 20
Joined: Fri Oct 17, 2025 8:35 am

“Copy MSI log to” makes no copy when a silent install restarts the machine

Hello,

We’re on Advanced Installer 24.0 with an EXE bootstrapper. In our installer project, in the "Install Parameters" page, we have the “Enable verbose logging” and “Copy MSI log to” options on, and the Reboot behaviour is “Force Reboot after install”.

We have specified a path to copy the log file to in the “Copy MSI log to” field.

We observe:
1. During an interactive install (UI based), or during a silent install with the /norestart option: the log is copied correctly to the specified path.

2. During a silent install or uninstall without /norestart: no copy is made. The log shows CopyMsiLogFileCommit invoked about 2 seconds before logging stops, and then the machine restarts right away. Is this expected? Is there a way to have the copy finish before the forced restart, without requiring /norestart?

3. When uninstalling from Programs and Features (Apps & features), a copy is made, but it’s incomplete: it misses the last part of the log, including the “Removal completed successfully” line. Is there a way to get the complete log copied on uninstall?

Thanks,
SDutt
Liviu
Posts: 1419
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: “Copy MSI log to” makes no copy when a silent install restarts the machine

Hello SDutt,

At the moment, this is the most we can achieve with the new Copy MSI log to option.

For installations that run without the full user interface, we added custom actions to the Rollback and Commit stages of the Install Execution Stage to perform the log copy. However, these actions run before Windows Installer has completely finished the session and closed the log file. As a result, they may not capture the final entries written to the log.

In the forced-restart scenario, the system may restart immediately, and the log copy may not have enough time to finish. At the moment, we do not have a confirmed workaround that guarantees the copy will complete without using the /norestart option.

However, our development team will investigate this scenario further to see whether there is a reliable way to ensure that the log is copied before the forced restart occurs.
3. When uninstalling from Programs and Features (Apps & features), a copy is made, but it’s incomplete: it misses the last part of the log, including the “Removal completed successfully” line. Is there a way to get the complete log copied on uninstall?
In this scenario, the log is copied, but because the copy operation takes place before Windows Installer has completely finished the uninstall session, the copied file may not contain the final part of the log.

Unfortunately, we have not found a workable solution that would allow us to reliably capture those final entries from within the installer itself.

Capturing the log only after the Windows Installer session has fully ended would require an external process that remains active after the installation or uninstallation finishes, which is outside what the current implementation can reliably handle.

So, for now, these are the current limitations of the Copy MSI log to option.

Let us know if you have any other questions.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”