Useful feature
I'm trying to do the following : (sorry for my english)
The software download is passed thru an email validation so you can actually know who uses your work.(I'm writing interactive maps software, so it has to fetch data on server)
On install, the user has to enter his email into the install window.
Nsisdl then fetches a php file which writes to a server database: the email, and unique ID/Password, sends back a key file containing these datas and writes it to the install dir.
Everytime the user uses the software, he is identified and logged, so he is charged on 'per use' basis.
here's my code :
How can I do to get the user to enter his email and pass it to code.php?
and I can't get it to copy the key file into INSTALLDIR
Function Downloadkey
StrCpy $1 $TEMP\porearre1.dll
StrCpy $2 "$TEMP\code.htm"
File /oname=$1 nsisdl.dll
Push http://www.domain.com/code.php?email=
Push $2
CallInstDLL $1 download
Delete $1
StrCmp $0 success success
SetDetailsView show
DetailPrint "download failed: $0"
Abort
success:
;ExecWait '"$2" /S'
;Delete $2
Pop $0
;StrCmp $2 "" skip
StrCpy $INSTDIR $2
skip:
FunctionEnd
; The stuff to install
Section "Zipmapper"
; Set output path to the installation directory.
SetOutPath $INSTDIR
Call Downloadkey
File "C:\WINDOWS\Bureau\Nsis20\loupe.gif"