Archive: semi-silent installer and InstFiles


semi-silent installer and InstFiles
I'm currently making an installer semi-silent by allowing for unattended installation using a sort of 'preferences file'.

When a preference is invalid or missing, I still want the user interface to show up - which seems to exclude a silent installer as I can't switch silent mode anywhere outside of .onInit.

So instead for any page where I do have a valid 'preference', I simply call Abort in the Pre function so that the page never shows, and set any variables/etc. to the appropriate values based on the preference which might otherwise be handled in any Post function.

This all works quite lovely, but then in comes the special InstFiles page. Calling Abort in its Pre or Show (does it even have one - using MUI?) functions does absolutely bupkis.
I can stick HideWindow in the pre function, or in the first section, but that will still flash InstFiles onto the screen for a fraction of a second.

Now personally I don't mind the InstFiles page popping up - any unattended install isn't going to care about a dialog, as long as the application finishes and exits okay, and personally I like having -some- visual confirmation of things happening even with a silent installation. But for the user expecting a completely invisible installation, I'd still like to be able to hide it completely without any UI flash.

So... can it be done at all, or am I SOL and just need to deal with the flash? If it -can- be done... how?

Most of the threads deal with the opposite.. a silent installer that users -do- still want to show the InstFiles page for.. go figure :)

Thanks in advance!


You should use silent installer and set it in .onInit if silent installers is what you want. Simply make sure everything you need is present in the preferences file before you set the silent mode.


yeah, that's the thing - I don't want a silent installer, but I think what you're saying is.. (pseudocode)


If (not using a preferences file) then (
proceed with installation as a full UI installer
)
else (
if (all preference values are found and valid) then (
set installation type silent, which hides instFiles
)
else (
proceed with semi-silent installer (some pages may display), instFiles shows up as well as a result
)
)


Which is a good idea and I'll have to see how easy that is to implement - duplicating and/or moving code out of pages and to .onInit - thanks :)

I take it that the "don't show instFiles in a non-silent installer" is one of the things that can't be done, though? :)

You don't have to move the code to .onInit, it can stay in the sections. Only silent installers execute sections code outside of the instfiles page.


That'd be fine if all code was within sections - but a lot of it is in pre/post functions for other / custom pages.. those don't seem to get called if the installer is in silent mode.