- NSIS Discussion
- MUI Installer runs without window
Archive: MUI Installer runs without window
pozbremser
25th April 2007 14:49 UTC
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.
Red Wine
25th April 2007 17:33 UTC
Probably there is /S switch in the calling parameters.
pozbremser
25th April 2007 18:37 UTC
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
25th April 2007 20:27 UTC
Does it happen with any MUI setup or just yours? Does your MUI setup work if executed outside of that INI file?
pozbremser
26th April 2007 09:16 UTC
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.
kichik
26th April 2007 21:05 UTC
Then I'd need to see your script to figure out what's wrong.
pozbremser
27th April 2007 10:46 UTC
Thank You.
kichik
27th April 2007 12:22 UTC
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
27th April 2007 14:47 UTC
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
28th April 2007 21:00 UTC
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
pozbremser
30th April 2007 08:31 UTC
it works fine! Thank You!