I have an Inno Setup script that installs my application and its accompanying files. On some systems a restart is required, on some not. I would like to find out the reason for the required restart. How would I do this most intelligently? Thank you very much.
For debugging purposes you can peek inside
HKLM\System\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations
to see if there are any moves/renames/deletes queued for the next reboot.
(Sysinternals utility viewer)
Use /LOG
when you run the install and then look at the log file that it generates (by default in %TEMP%
). It should fairly clearly show in there which files were queued for replacement on restart, or which other reasons caused a restart request to be issued.
Usually restarts are triggered by overuse of restartreplace
without using something like AppMutex
to ensure that the application has been shut down properly before installing, or from subinstalls executed during [Run]
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With