Skip to content
⌘ NSIS Forum Archive

MUI Installer runs without window

11 posts

pozbremser#

MUI Installer runs without window

Hallo,

PSetup.exe is a prerequisites checker from Microsoft.
It checks ms-components (.net 1.1, .net2, sql 2005 ...)
After check PSetup.exe called my installer and installer runs.

I created MUI Installer.
PSetup calls MUI Installer and MUI Installer runs,
but without window (in Task Manager I can see it)

has somebody this problem?
Thanks for Answer.
pozbremser#
probably.
it's the art in which PSetup.exe calls installer.
PSetup.ini has parameter "PostInstallAction"

I set the parameter:
PostInstallAction=DemoSetup.exe
it means, that after checking prerequisites
DemoSetup.exe will be started.

this worked with old (not MUI-Setup).

new MUI setup be started too, but without window.

I fix it temporally with bach-file:

PSetup.exe /uionlyifneeded /continue
DemoSetup.exe

but it's not nice, if cmd-window is open all the time
during the installation.
kichik#
Does it happen with any MUI setup or just yours? Does your MUI setup work if executed outside of that INI file?
pozbremser#
Q: Does it happen with any MUI setup or just yours?
A: ..\NSIS\test\Examples\Modern UI\Basic.nsi
it runs!
also, it happen only with my setup

Q: Does your MUI setup work if executed outside of
that INI file?
A: yes, it works outside of INI file.
with INI file it runs, but without window.
pozbremser#
Thank You.
kichik#
Seems like PSetup.exe expects a URL there and opens it using ShellExecutes with SW_HIDE. Use ShowWindow and BringToFront in .onInit.
!include WinMessages.nsh
Function .onInit
ShowWindow $HWNDPARENT ${SW_SHOW}
BringToFront
FunctionEnd
pozbremser#
Thanks.
I try it, no changes.

I started delete earch line in script, and after deleting
the line: !insertmacro MUI_PAGE_WELCOME
it worked.

I insert the line in
..\NSIS\test\Examples\Modern UI\Basic.nsi
and Basic.exe doesn't be called from PSetup.exe.


it's original pages-part ob Basis.nsi,
and it works
;--------------------------------
;Pages

!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

that doesn't work
(macro !insertmacro MUI_PAGE_WELCOME is inserted)
;--------------------------------
;Pages

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

that works
(the line !insertmacro MUI_PAGE_WELCOME is not first line
in the page-part of script)
;--------------------------------
;Pages

!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

there is a difference between welcom and another build-in pages of NSIS MUI-Interface.
kichik#
Use the code I posted above in .onGUIInit.
!define MUI_CUSTOMFUNCTION_GUIINIT my.onGUIInit
!include WinMessages.nsh

Function my.onGUIInit
ShowWindow $HWNDPARENT ${SW_SHOW}
BringToFront
FunctionEnd