user1234
user1234

Reputation: 309

how to dynamically insert custom pages in nsis installer

I have installer_type variable which will have either desktop or server as its value.

If the value is server then page1 should get inserted in the installer and page2 should be hidden for this installer and vice versa.

StrCmp installer_type "server" 0 +3
Page custom page1 page1Leave
Goto Done
Page custom page2 page2Leave
Done: 

Please let me know how to achieve this in .nsi file

Upvotes: 1

Views: 2436

Answers (2)

Joe DF
Joe DF

Reputation: 5548

just insert when you want see it

http://nsis.sourceforge.net/Docs/Chapter2.html#2.3.2

example

if you want to see directory then license:

Page directory
Page license

Upvotes: 0

Anders
Anders

Reputation: 101569

The number of pages is fixed at compile time, but you can call the Abort instruction in the page pre callback function to skip the page.

Upvotes: 1

Related Questions