Best Practices
I have been reading the forum and the wiki for about a week now and still have a few questions about the best way to implement a few things as well as a few questions.
First off here is what I am doing. I am creating a custom dialog that gets some user input (select one of two options via radio button in a group box). Based on this I either delete a file or don't and then start an external MSI (wrapped in an exe).
I am having very sporadic and inconsistant results when reading the state of the the radio buttons. I think that this may be because I am saving the state in the post callback function of the custom page (is this too soon?). Here is the order of the pages.
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
Page custom SelectInstall runMSI
!insertmacro MUI_PAGE_FINISH
my SelectInstall looks like this.
Function SelectInstall
!insertmacro MUI_HEADER_TEXT "$(INSTALLOPS_TITLE)" "$(INSTALLOPS_SUBTITLE)"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "InstallOps"
!insertmacro MUI_INSTALLOPTIONS_READ $InstTypes "InstallOps" "Field 3" "State"
FunctionEnd
my runMSI looks like this
Function runMSI
StrCmp $InstTypes "1" 0 InstallUn
MessageBox MB_ICONINFORMATION|MB_OK "Running managed $InstTypes"
ExecWait '"$INSTDIR\setup.exe" '
Goto DoneInstall
InstallUn:
MessageBox MB_ICONINFORMATION|MB_OK "Running UnManaged $InstTypes"
Delete "$INSTDIR\GRC.DAT"
ExecWait '"$INSTDIR\setup.exe" '
DoneInstall:
Exec '"$INSTDIR\uninst.exe" /S'
FunctionEnd
This is where I am currently at. I am really excited about NSIS. I think it will be very useful if I can become proficient in it.
Ultimately I would like to know when it is most appropriate to run an external setup (and can the NSIS installer be minimized until the second installer finishes?)
Thanks