Archive: Installer starts minimized


Installer starts minimized
Hi,

My NSIS installer often starts minimized. My guess is that WinXP is trying to be clever. But in any case, I don't want it to happen on my client's machines.

Here is the solution that I've found.

Comments are appreciated.


!include "WinMessages.nsh"
...

Function .onInit
...
; Start window in regular mode (not minimized)
GetDlgItem $0 $HWNDPARENT 1
ShowWindow $0 ${SW_NORMAL}
FunctionEnd

; If you are worried about multiple instances, here is
; code for setting/checking a mutex, aborting the second
; window and restoring the first.
; Courtesy of nvit and Stu (Afrow UK)
; http://forums.winamp.com/showthread....hreadid=256393



Regards,

Larry

Or use this code:

Function .onGUIInit  
; Start window in regular mode (not minimized)
; This code makes the window animate up before being shown
ShowWindow $HWNDPARENT 6 ; I think six is ${SW_RESTORE}.
FunctionEnd


MUI requires a define (can't remember what its called) to use the .onGUIInit function, so that you can use this code.