How to create dynamically changing serial numbers using Inno Setup?

时光总嘲笑我的痴心妄想 提交于 2019-12-25 04:22:20

问题


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.

来源:https://stackoverflow.com/questions/24696318/how-to-create-dynamically-changing-serial-numbers-using-inno-setup

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!