0

I have a page that prompts for serial number for my application when it is installed. I created the setup file using Inno Setup. What I would like to do is this : to prevent more than one installation using one setup file, I need to dynamically change the serial number that i would have provided in the inno setup scripting file. (i.e) Say i have supplied 123 as the serial number to my software and sell it. The buyer, once he enters that serial number and installs it, I need to change the value of the previous serial number to some random value so that when another person tries to install the software using the same serial number 123, it should not get installed. Kindly help out.

I have the code:

procedure OnSerialEditChange(Sender: TObject);
var 
    CanContinue: Boolean;
begin
    CanContinue := GetSerialNumber('-') = SerialNumber;
    WizardForm.NextButton.Enabled := CanContinue;
end;

And I initialise the value of the 'SerialNumber' in the 'InitializeWizard' procedure. Kindly tell me if what I want to do is possible or not.

Julyflowers
  • 133
  • 2
  • 13
  • 1
    The best you can do is having an online service that will keep track of used serial numbers. When the user enters their serial number, you'll post this number to that service, it checks whether the number is not used yet and if so, you'll allow the installation. Otherwise you'll report that this number is used (by someone else). – TLama Jul 11 '14 at 11:18
  • This is a small project which is why I didn't go for it. And I'm nearing my deadline. So there's no other way? – Julyflowers Jul 11 '14 at 11:38
  • 1
    Except online registration service I can't think of any other reliable way except building for each customer separately with their unique number which you gave them. Well, you could validate that number against something unique on the users side, but that user would have to give you that "something unique" and after then you'd tell them the number generated from that "something unique". But that would again require data exchange between the user and you. – TLama Jul 11 '14 at 11:47
  • 1
    @TLama is correct. If you don't have the time to (or don't want to put the effort into) implement this properly, you're out of luck. You can't do it any other way that wouldn't involve hard-coding some information in on each copy of the installation, meaning that each copy of the installer would have to be custom-built for each install. "Give me something fast, free, and secure" isn't possible. You'll have to do the work to implement what you want properly. You can't do "dynamically changing but without validating somehow" and hope to protect anything. – Ken White Jul 12 '14 at 01:12
  • 1
    In addition to the above (if you want something good & fast, you have to pay for it), it's not worthwhile validating only in the installer anyway; someone could install and then distribute the resulting installed application (or build their own installer). If you want to have any hope of security, it's the application's own job. – Miral Jul 12 '14 at 13:03

0 Answers0