Topic: [Script] Create trial project

It allows you to make your project work with a limited period, such as 30 days.


Also giving the client a program for testing, you can delete the file from the folder Script.pas Script, to the script could not be modified.


procedure Form1_OnShow (Sender: string; Action: string);
var
   reg: TRegistry;
   iDays: integer;
begin
     reg := TRegistry.Create;
     reg.Access := KEY_ALL_ACCESS;
     reg.RootKey := HKEY_CURRENT_USER;
     reg.OpenKey('software\MyVisualDatabaseTrial',true);
     if not reg.ValueExists('StartDate') then reg.WriteDate('StartDate', Now+30); // trial period is 30 days

     iDays := Trunc(reg.ReadDate('StartDate')) - Trunc(Now); // time left days

     reg.CloseKey;
     reg.Free;

     if iDays < 1 then
     begin
          if MessageDlg('Trial period is over.'+#13+' Do you want to visit a order page?', mtInformation, mbYes+mbNo, 0) = mrYes
              then OpenUrl('http://yourpage.com');

          Form1.Close;
          Exit;
     end;

     if MessageDlg('Demo version. Time left: ' + IntToStr(iDays) +' days.'+#13+'Do you want to visit a order page?', mtInformation, mbYes+mbNo, 0) = mrYes
         then OpenUrl('http://yourpage.com');

end;

begin
end.

Download project:
http://myvisualdatabase.com/forum/misc. … download=1


Another project with serial number:
http://myvisualdatabase.com/forum/misc. … download=1

Post's attachments

Attachment icon Trial and Serial.zip 5.87 kb, 1349 downloads since 2015-10-05 

Dmitry.

Re: [Script] Create trial project

How to make specific key for specific time...
for example 120 day,180 day ,777 day ,life time etc

JUST LEARNING, O GOD HELP ME.

Re: [Script] Create trial project

Serials for duration base, please visit the topic.
http://myvisualdatabase.com/forum/viewtopic.php?id=3124

JUST LEARNING, O GOD HELP ME.