Old 9th September 2021, 21:51   #1
Sandwedge
Junior Member
 
Join Date: Sep 2021
Posts: 3
Adding License Page to working script

Hi Everyone,

First post and just started using NSIS. Really cool environment.

I have an installer working perfectly, but I need to add a license page and acceptance before install.

I cannot seem to get the syntax right or where to place the page code.

PageEx license
LicenseData license.txt
LicenseForceSelection checkbox
PageExEnd

Note if I place the PageEx code in my script it does bring up the license and Checkbox but it will not execute the Section code to continue with the installation. I'm hoping that I'm missing something simple.

Any assistance would be greatly appreciated.
Kindest,
Sandwedge is offline   Reply With Quote
Old 9th September 2021, 23:41   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,418
Do you have other pages? You need Page InstFiles.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 10th September 2021, 11:53   #3
Sandwedge
Junior Member
 
Join Date: Sep 2021
Posts: 3
Adding License

Thanks for the reply!

This is my whole script. Without the PageEx section it works fine, I'm not sure where to add the PageEx section.

;--------------------------------

; The name of the installer
Name GEO-OSINT-INSTALLER

; The file to write
OutFile "GEO-OSINT-INSTALLER.EXE"

; The default installation directory
InstallDir $PROGRAMFILES\SilentSignals\GEO-OSINT

; The text to prompt the user to enter a directory
DirText "Select Target Folder for Installation"

;--------------------------------

PageEx license
LicenseData licdata.txt
LicenseForceSelection checkbox
PageExEnd

; The stuff to install
Section "" ;No components page, name is not important

; Set output path to the installation directory.
SetOutPath $INSTDIR

; Put file there
File GEO-OSINT.exe
File hlist.db
File locations.kb
File ss.jpg
File go.ico
CreateShortcut "$DESKTOP\GEO-OSINT.lnk" "$INSTDIR\GEO-OSINT.EXE"

SectionEnd ; end the section
Sandwedge is offline   Reply With Quote
Old 10th September 2021, 14:00   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,418
Add "Page InstFiles" after PageExEnd. InstFiles is added automatically if there are no pages in the script.

You might also want to add a directory page. And you should write the shortcut to $smprograms, not the desktop...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 10th September 2021, 15:36   #5
Sandwedge
Junior Member
 
Join Date: Sep 2021
Posts: 3
Thanks for all your assistance.

Got it working.

Love the tool.
Sandwedge 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