Archive: Installer protection (username and password)


Installer protection (username and password)
Hello
I would like to protect (by password and username) my installer, that only one person can install it.
I found great plugin by Stu (http://nsis.sourceforge.net/PassDialog_plug-in). I use example with md5 sum.

But, there is one problem. This doesn't protect with multiply usage by different users. I mean that I got:
UserName: name
Password: pass

To run this installer user must know that the username field is "name" and password field is "pass". So I send him this information by email (after he paid me some money for a licence). But what if this user give this information to another people, that doesn't paid for program?

How to do, that only one user can install my application?
I thought, that I can use some unique string in password, for each user, for example Disk Serial Number.
I found this function:

; $0 - Drive to check returns the Disc Serial Number
Function GetDiskVolumeSerialNumber
!define GetVolumeInformation "Kernel32::GetVolumeInformation(t,*t,i,*i,*i,*i,t,i) i"
System::Call '${GetVolumeInformation}("C:\",,${NSIS_MAX_STRLEN},.r0,,,,${NSIS_MAX_STRLEN})' ;$0
FunctionEnd ;GetDiskVolumeSerialNumber

I don't know how to use this information to build installer that can be run with this data for each user.
Can anyone tell me is it good way to protect my application?

Thanks for any help (if somebody understood me... I am lost with it...)

-Pawel


You may want to take a look here,

http://nsis.sourceforge.net/ReadCustomerData


If I were to do this I would have a MySQL database online. When the installer is ran, a new record is added to a table with a unique id, user name, password and their unique code that identifies them (however you generate that though I am not sure).

Stu