Archive: MUI Installer runs without window


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.


Probably there is /S switch in the calling parameters.


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.


Does it happen with any MUI setup or just yours? Does your MUI setup work if executed outside of that INI file?


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.


Then I'd need to see your script to figure out what's wrong.


Thank You.


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

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.


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

it works fine! Thank You!