Archive: Process in ExecWait reboots


Process in ExecWait reboots
Hello

I'm a new user of NSIS.
I need to redistribute Windows Common Controls, SHFolder.dll, Microsft Data Access Components and a few others.

Problem is, to install these, I have to Exec some installers from Microsoft (madc_typ.exe, 50comupd.exe, SHFolder.exe) that in turn will install the components. This is the documented way to redistribute the .dlls and this is how I have to deploy them.

Now any of these can potentialy reboot the computer, and I have to install all of them.

I found somewhere on these pages that NSIS denies WM_QUERYENDSESSION requests from Windows while it is installing.

Is this in the help file, I mean is this behaviour documented so that I can count on it ? Is it enough and a safe method so that I can create my installer ?

If the installer is silent does the installer still do the job ?

Can I have makensis.exe output an installer that could interrupt an installation to allow for a reboot at ExecWait and then continue or something like this ?

How can I ExecWait a proces that reboots ?

Thank you
Adrian Constantin
Romania


Microsoft installers usually accept a switch that prevents a reboot. Unattended contains information about this switches.

As for NSIS, the change log says WM_QUERYENDSESSION is denied since 2.02. As you've guessed, this isn't done in a silent installer because there's no window to receive messages.


I wish there would be a better way.

Excelent list of Install Systems though.

Now that I think of it, I've seen setups that could reboot and continue. Do you know of any Install System that would let me do such an installer ?


Why would you want to stop the installer for every reboot? It's a much more pleasant user experience to have just one reboot.


Because I want to install 50comupd.exe (comctl32.dll 5.8 from Microsoft) and that one will reboot (with user's permision) on old win versions. Same for MDAC (mdac_typ.exe) and SHFolder.dll (SHFolder.exe)

Besides, if comctl32.dll v5.8 is waiting for a reboot to be installed than many of my dll's may not be registered if they are staticaly linked to it. LoadLibrary called from regsrv32.exe (or directly form the NSIS installer that registers my dll) will see the old comctl32 still in use on the user system and will fail (because my dll will not link to the old comctl).

And I also need to start my executable after install to register a new service in Control Panel and my executable may need any of the installed files currently waiting for a reboot if it staticaly links to them. Actualy for my executable to start in any way instalation must be complete and all .dlls updated and registered.

Fortunately IS appears to 'magicaly' redistribute MDAC and comctl32 without several reboots, but I am afraid it does nothing more than repackaging, and Microsoft doesn't actualy allow this for it's redists.

Can NSIS execute 'ExecWait' after a reboot, as it can execute 'File' and 'Delete' ?

Timothy Madden
Romania


With the information on the link I've posted, you can make the installers silent and deny reboot.

In the latest version of NSIS, the Library macro will delay registration of DLLs until reboot, if the reboot flag is set. You can check the return value of the installers and set the reboot flag accordingly.