Old 22nd May 2015, 12:51   #1
Tracer1808
Junior Member
 
Join Date: May 2015
Posts: 6
NSIS - custom dialog and dll functions

Hi,

I never used NSIS installer and the thing I need is not so simple (at least I think).

After starting a setup and after clicking Next on the welcome screen I need a custom dialog with edit (password) field to appear. User would input password into the field and on clicking next I would verify the password by calling my dll function (dll would be inside setup). If my dll function returns true user may continue Next.

I know how to do this by using INNO setup but would like to transfer all my setups to NSIS.

So, I hope you will be able to help me since there is a lot of stuff here

1) Creating a custom page
2) Calling a dll function

Thank you!
Tracer1808 is offline   Reply With Quote
Old 22nd May 2015, 13:13   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
1. nsDialogs plug-in
2. System plug-in

See the Examples folder.

Stu
Afrow UK is offline   Reply With Quote
Old 24th May 2015, 08:33   #3
Tracer1808
Junior Member
 
Join Date: May 2015
Posts: 6
OK. I created a dialog and it all works fine. The next thing I need to do is to extract my dll into temporary folder and connect to it. As I saw it, I should be using $PLUGINSDIR to address the temporary folder?

The problem is that the following code has no effect, since I'm probably doing something wrong:

Section
InitPluginsDir
SetOutPath $PLUGINSDIR
File mydll.dll
SectionEnd

I need mydll.dll to be extracted at the beginning of the setup or just before my custom dialog appears.


EDIT: Found something.

Function .onGUIInit
InitPluginsDir
File /oname=$PLUGINSDIR\mydll.dll "mydll.dll"
FunctionEnd

This works..

Last edited by Tracer1808; 24th May 2015 at 10:20.
Tracer1808 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