agroconnect
9th July 2009 13:02 UTC
confirm installation
is there a way to display a yes/no dialog just before the user finishes the installer
background:
- i am abusing a nsis script for starting another prorgramm
- i use !insertmacro MUI_PAGE_INSTFILES and a sections for starting the application
- if installation has worked the user has to press "finish"
- .onInstSuccess the application will be closed
i would like to add a confirmation dialog if the user presses "finish" where he can decide to go back or to stop the installer and the application
any suggestions
Afrow UK
10th July 2009 11:59 UTC
Why would you want to go back? This is not the default behaviour. Are you actually installing anything or are you just running an existing executable?
Stu
agroconnect
10th July 2009 12:09 UTC
i am just running an executable (i.e. a tomcat webserver) whicht tkaes some time(t>60s) to start up
i would like to ask the user if he really wants to stop the application 8the tomcat-server)
as mentioned, i am abusing nsis for a different purpose
Afrow UK
10th July 2009 12:15 UTC
Why use NSIS? That aside what I used to do was just have SilentInstall silent (to remove the dialogs) and then you can just have a MessageBox in a section:
!include LogicLib.nsh
Caption `Stop Tomcat?`
OutFile StopTomcat.exe
SilentInstall silent
Section
${If} ${Cmd} `MessageBox MB_YESNO|MB_ICONQUESTION 'Stop Tomcat?' IDYES`
...
${EndIf}
SectionEnd
Much better to write a C/C++ or .NET program to do this though in my opinion.
Stu
agroconnect
10th July 2009 13:06 UTC
silentinstall is a option i haven't thought about yet, but i will do now
i used a mui-installer with just a MUI_PAGE_INSTFILES
so i can display some "useful" hints while starting the server
and start a second application when the server should be ready
sure a c/c++/qt or .net application would be good, but my favorite is java so i decided to abuse nsis
see example http://safe.agroconnect.fh-bingen.de...artsilent.html