Roel
6th January 2006 11:04 UTC
Showing a dialog while an ExecWait is running
Hi,
I'm trying to make an installer that checks wheter DirectX 9 is installed and if not, installs it. I package the DirectX redistributables in my setup and I can install it fine. I do that like this (in the .onInit):
InitPluginsDir
File /oname=$PLUGINSDIR\WaitWhileExtractingDlg.ini "WaitWhileExtractingDlg.ini"
InstallOptions::dialog "$PLUGINSDIR\WaitWhileExtractingDlg.ini"
SetOutPath "$TEMP"
File /r "DirectXRedist"
HideWindow ;hide installer window
ExecWait "$TEMP\DirectXRedist\dxsetup.exe"
BringToFront
As you can see I unpack the directx files to the temp directory and run the installer from there. Problem is now that no dialog is showing while the extraction is running. As shown above I've tried to fix it with a Page command but it doesn't show a dialog. Is there a way to show a message or dialog while an ExecWait is running? The same small dialog that is shown while an installer is initializing would be perfect. Thanks.
Takhir
6th January 2006 11:38 UTC
I am not sure how good is custom dialog before .onGUIInit, but any case you can use Banner plug-in from NSIS distribution (Start->Programs->NSIS->Contrib) or one of banner plug-ins from archive. This may be small but TOPMOST banner in the bottom-right part of desktop workarea (some code required to move banner).
BTW if your package is on CD you can leave DirectX outside main package and run it from $EXEDIR if required (zero time to extract). Or if user downloads single exe file from Net, you can use InetLoad plug-in (the same link) for optional download.
kichik
6th January 2006 11:40 UTC
Use the Banner plug-in.
Roel
6th January 2006 13:01 UTC
The Banner plugin works like a charm, thanks a lot guys! I thought it was only for displaying a splash screen, show how much I have to learn about NSIS!
Takhir: I need my setup to be a single file and self-containing, so no loading from internet, but thanks for the hints - Banner works just fine!