Old 17th May 2006, 07:53   #1
folly
Junior Member
 
Join Date: May 2006
Posts: 4
Inserting additional pages

Your help is needed to guide on how to insert additional pages into this system generated script as all efforts to do so did not yield the desired results.

I want to insert the serial number page just after the
welcome page.

the serial key is defined as below
## Displays the serial dialog
Function SerialPageShow

!insertmacro MUI_HEADER_TEXT "Enter Serial Code" "Enter the software serial code to continue."

PassDialog:ialog Serial \
/HEADINGTEXT 'Please enter the serial code located on the software CD case...' \
/CENTER \
/BOXDASH 92 70 3 '' \
/BOXDASH 172 70 3 '' \
/BOX 252 70 3 ''

Pop $R0 # success, back, cancel or error

FunctionEnd

## Validate serial numbers
Function SerialPageLeave

## Pop values from stack
Pop $R0
Pop $R1
Pop $R2
;Pop $R3
;Pop $R4
## A bit of validation
StrCmp $R0 '421' +3
MessageBox MB_OK|MB_ICONEXCLAMATION "Wrong input!"
Abort

StrCmp $R1 '890' +3
MessageBox MB_OK|MB_ICONEXCLAMATION "Wrong input!"
Abort

StrCmp $R2 '576' +3
MessageBox MB_OK|MB_ICONEXCLAMATION "Wrong input!"
Abort

## Display the values
MessageBox MB_OK|MB_ICONINFORMATION "Authorised to install this application"

FunctionEnd

;////////////////////////////////////////
this is the main code
; Welcome page
!insertmacro MUI_PAGE_WELCOME
; License page
!insertmacro MUI_PAGE_LICENSE "userLicence.rtf"
; Components page
!insertmacro MUI_PAGE_COMPONENTS
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Start menu page
var ICONS_GROUP
!define MUI_STARTMENUPAGE_NODISABLE
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "HICA"
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"
!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!define MUI_FINISHPAGE_RUN "$INSTDIR\HICA.exe"
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt"
!insertmacro MUI_PAGE_FINISH

; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES

; Language files
!insertmacro MUI_LANGUAGE "English"

; MUI end ------
;/////////////////////////////////////////////////////

thanks upfront
folly is offline   Reply With Quote
Old 17th May 2006, 08:01   #2
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 916
Put this command after the '!insertmacro MUI_PAGE_WELCOME' command:
code:
page custom SerialPageShow SerialPageLeave

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

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