如何设置此序列形式的序列号(Inno Setup)

not*_*ore 2 validation inno-setup serial-number custom-pages

我正在寻找一个串行脚本,我在这里找到了一个:

Inno Setup中序列号的CustomPage

但是如何设置序列,因为所有序列号现在都有效.

感谢您的回答!

TLa*_*ama 5

从我的代码扩展previous post,如果要将序列号与常量值进行比较,可以通过这种方式修改脚本.允许用户继续的唯一有效序列号将是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;
Run Code Online (Sandbox Code Playgroud)

但请注意,将序列号存储为常量并不是一个好习惯.您应该考虑使用其他方式来验证您的产品.