Old 29th July 2010, 11:16   #1
theaskingman
Junior Member
 
Join Date: Jul 2010
Posts: 16
don't show page_Startmenu when specific section selected

Hi,
in my MUI script the user can choose between 3 sections (A, B, C). The user can only select one of this (using Radio Button plugin).
One of this section ("C") does execute an external installer.

When the suer chooses "C", there is no need to show the MUI_PAGE_DIRECTORY and MUI_PAGE_STARTMENU, because everything is handled in the external installer and it's no use showing it. (In this case, all files are installed and handled by the external installer)

But how can I disable the two pages, when the user chose "C"?

thx for your help
theaskingman is offline   Reply With Quote
Old 29th July 2010, 14:23   #2
theaskingman
Junior Member
 
Join Date: Jul 2010
Posts: 16
i searched a little bit for answers and found a skipping tutorial, but it still doesn't work the way I need it

( http://nsis.sourceforge.net/Skipping_Pages )

I added the function:
code:
Function dirPre
${If} ${SectionIsSelected} ${TheExternalInstallerSection}
abort
${EndIf}
FunctionEnd



and call this before the directory and start menu pages :
code:
!define MUI_PAGE_CUSTOMFUNCTION_PRE dirPre
!insertmacro MUI_PAGE_DIRECTORY

!define MUI_PAGE_CUSTOMFUNCTION_PRE dirPre
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder



The problem is now, that the external installer never gets executed. I have to embed the Installer.exe and wanted it to be stored in $temp

code:
; ExternalInstallerSection

Section $(ExternalInstallerName) TheExternalInstallerSection
SetOutPath "$TEMP"
File "extInstaller\Installer.exe"
ExecWait '"$TEMP\extInstaller\Installer.exe" /NoMenuItems'

Delete "$TEMP\Installer.exe"

;BUG1 the installer is not deleted after installation
;BUG2 atm the exec command isn't executed when skipping directory and Start menu page

SectionEnd

theaskingman is offline   Reply With Quote
Old 29th July 2010, 15:20   #3
theaskingman
Junior Member
 
Join Date: Jul 2010
Posts: 16
code:
Function .onGUIEnd
${If} ${SectionIsSelected} ${TheExternalInstallerSection}
Delete "$TEMP\Installer.exe"
${EndIf}
FunctionEnd



+ outputPath didn't match with the ExecWait
(in the section), that was maybe the problem that the exec wasn't called
(changed it several times and forgot to adjust the paths)

now everything is working, don't know if that's the quick'n'dirty version, but it works
theaskingman is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Tags
disable pages, external installer

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump