tags:

views:

112

answers:

1

I have a NSIS installer I want to be totally silent unless it needs to download additional files. I can make it totally silent with SilentInstall, but then i can't make my download dialog appear (i'm using InetLoad::load).

I would like to tell NSIS not to show any windows until I say so. The best I can come up with is HideWindow. Unfortantly it looks like NSIS defaults to showing the window and then hiding it causing a flicker.

How can I prevent a flickering window?

Example code:

Name "Flicker test"
OutFile "flickertest.exe"

AutoCloseWindow true

Section
    HideWindow
SectionEnd
+1  A: 

This is a hack way of doing it:

!include "${NSISDIR}\Examples\System\System.nsh"

Name "No Flicker test"
OutFile "noflickertest.exe"

AutoCloseWindow true

Function .onGUIInit
    ; move window off screen
    System::Call "User32::SetWindowPos(i, i, i, i, i, i, i) b ($HWNDPARENT, 0, -10000, -10000, 0, 0, ${SWP_NOOWNERZORDER}|${SWP_NOSIZE})"
FunctionEnd

Section -main
    HideWindow
SectionEnd
djp