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.
Asked
Active
Viewed 695 times
7
-
1Just for debugging? You can peek in HKLM\System\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations to see if there are queued moves/deletes awaiting the next reboot – Alex K. Oct 30 '12 at 13:06
-
@Alex, there's no direct way to determine it from the InnoSetup script, so it could be the answer. – TLama Oct 31 '12 at 16:17
-
Yes, please set it as "answer". – tmighty Oct 31 '12 at 16:32
2 Answers
5
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.

Alex K.
- 171,639
- 30
- 264
- 288
1
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]
.

Miral
- 12,637
- 4
- 53
- 93