Archive: Splash Behaviour?


Splash Behaviour?
Hi guys,

Does anyone know how to close the splash screen from an NSIS script? A SendMessage command, perhaps? I've tried FindWindow and FindWindowByTitle but they can't find the thing.

Better yet, does anyone know how to make the splash screen ignore a user's mouse clicks, so that it won't close unless NSIS tells it to?

I've attached an example picture file that I'd like to use in one of my installations.

Thanks,
Alex


Eh, am I correct in saying that you want a "Creating icons" window in a colour other than the user's colour scheme to appear on the screen for a set amount of time, refusing to go away, with that said amount of time being far greater than the time taken to actually create the icons?

Not very user friendly I wouldn't think...


Re: Splash Behaviour?

Originally posted by petersa
Hi guys,

Does anyone know how to close the splash screen from an NSIS script? A SendMessage command, perhaps? I've tried FindWindow and FindWindowByTitle but they can't find the thing.

Better yet, does anyone know how to make the splash screen ignore a user's mouse clicks, so that it won't close unless NSIS tells it to?

I've attached an example picture file that I'd like to use in one of my installations.

Thanks,
Alex
I see you are going for traditional (bloated) installer behaviour. The thing is, NSIS creates icons so quickly, it should only be open for a fraction of a second (as opposed to the many seconds other installers can take, using DDE or whatever they do to make icons)...

-Justin

Sorry, prodangle, you're incorrect...and I'm not exactly looking for traditional installer behaviour either.

Okay, creating icons = bad example...

I have an installation for a program here that is made up of about 20 files. What I'm making NSIS do is extract these files to a temporary location, running the main setup program, and then killing this temporary folder.

I'm hoping for a way to make a small window pop up while it's extracting these files and starting the installation. Have a look at the attachment.

I'm trying to do something like PackageForTheWeb or WinZip SFX, but I'd rather use NSIS for its speed and size. Still, I'd like this small bitmap to pop up while it's doing something.


Being able to do this would be quite useful considering the installation is 20mb in size and will be run from a CD or Zip disk.


Well if you really want to, modify splash.exe to not do anything on a WM_LBUTTONDOWN, then use this in your script:


FindWindow $0 "_sp"
StrCmp $0 "" no
SendMessage $0 16 0 0
no:


Or something.

-Justin

The SendMessage line has no effect. The splash window just stays there.

Does anyone know of a free compiler I could use to change the source and recompile the .EXE? I've got no idea how to do it but I'm sure I can work it out. I don't have Visual C++ or whatever it is NSIS is made in.


Here's splash.exe changed the way Justing suggested. Hope that's a start :)


Thanks, prodangle, but while I was offline I stumbled across some hidden genius and made my own version:

Armed with the knowledge that WM_TIMER = 0x113 and WM_LBUTTONDOWN = 0x201, I went into a hex editor and searched for '01 13' and '02 01'.

Failing that, I searched for '13 01' and '01 02'. I found those and changed them to WM_CUT, which is 0x300.

Now it checks if it was sent either WM_CUT or WM_CUT, but hey, I'm not a programmer so that makes it okay. :D

So here's a version of SPLASH.EXE that only quits when you tell it to 'Cut!'.

  Exec '$TEMP\SPLASH 1 $HWNDPARENT $TEMP\SPLASH'
; do the stuff that takes a long time
FindWindow $0 _sp
SendMessage $0 0x300 0 0

Originally posted by petersa
The SendMessage line has no effect. The splash window just stays there.

Does anyone know of a free compiler I could use to change the source and recompile the .EXE? I've got no idea how to do it but I'm sure I can work it out. I don't have Visual C++ or whatever it is NSIS is made in.
Borland have a free compiler which you can use to compile both makensis and the exe head (see other thread). The only problem is that the size optimisations aren't as good.