PDA

Click to See Complete Forum and Search --> : Set InnoSetup not to restart by default


foxyshadis
Jul 29th, 2007, 06:04 PM
Is it possible to set something in the innosetup script files to make the final "restart to complete installation" screen default to no, instead of yes?

I have to test out my builds often several times a day, and typically do so by just hitting enter on the installer until it's finished, since it remembers all settings. But once in a while some file will be locked, and since we use restartreplace for everything, it'll start rebooting before I can catch it. Stress level nicely skyrockets when that happens. I know some of our users are like that too, so is there any way to make no the default action?

Thanks for any help!

randem
Jul 31st, 2007, 12:58 AM
Inno Setupt does not default to RESTART. You are causing the restart by using the restartreplace flag. If you remove that flag it Inno Setup will not trigger a reset, but if you have files that are locked they will not be replace either.

foxyshadis
Jul 31st, 2007, 10:53 AM
Sure, but we can't do that, since one of the items that gets updated is a shell extension. I'd like the installer to notify the user that a restart is required, but not actually perform it, since there are alternate methods to get it installed if you have some savvy.

randem
Jul 31st, 2007, 02:24 PM
All Inno Setup does is prompt the user to restart it does not actually restart automatically.

randem
Jul 31st, 2007, 03:16 PM
You could also use this from the Inno Setup Help Documentation:

[Setup]: RestartIfNeededByRun

Valid values:
yes or no

Default value:
yes

Description:

When set to yes, and a program executed in the [Run] section queues files to be replaced on the next reboot (by calling MoveFileEx or by modifying wininit.ini), Setup will detect this and prompt the user to restart the computer at the end of installation.