Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

InnoSetup: Find out reason for restart

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.

like image 614
tmighty Avatar asked Oct 30 '12 05:10

tmighty


2 Answers

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)

like image 125
Alex K. Avatar answered Oct 15 '22 21:10

Alex K.


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].

like image 39
Miral Avatar answered Oct 15 '22 21:10

Miral