How can i set the serial for this serial form (Inno Setup)

二次信任 提交于 2019-12-30 03:36:06

问题


I was looking for a serial script and I found one here:

CustomPage for Serial Number in Inno Setup

But how can I set the serial because all serials are valid now.

Thanks for your answer!


回答1:


Extending the code from my previous post, if you want to compare the serial number with a constant value, you can modify the script this way. The only valid serial number which allows users to continue will be 62FFU-GA4N8-T8N6W-WLQJW-N6WLQ-AJKD6:

procedure OnSerialEditChange(Sender: TObject);
var
  CanContinue: Boolean;
begin
  // the GetSerialNumber defined there returns you the serial number string
  // built from each edit box delimited by the char passed as a parameter
  CanContinue := GetSerialNumber('-') = '62FFU-GA4N8-T8N6W-WLQJW-N6WLQ-AJKD6';
  WizardForm.NextButton.Enabled := CanContinue;
end;

But note, it's not a good practice to store serial numbers as constants at all. You should consider to use another way to validate your product.



来源:https://stackoverflow.com/questions/11246105/how-can-i-set-the-serial-for-this-serial-form-inno-setup

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