Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Timed Usage

Posted on 1998-12-12
10
143 Views
Last Modified: 2010-04-04
How can I set my program so that it will only run for a set number of days from date of installation. As in a lot of shareware programmes. I presume this is something to do with dates and registry?
0
Comment
Question by:xpher
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 5

Expert Comment

by:scrapdog
ID: 1350811
>I presume this is something to do with dates and registry?

Yes.
0
 
LVL 20

Expert Comment

by:Madshi
ID: 1350812
Just write the installation date to the registry (HKEY_LOCAL_MACHINE\Software\YourCompany\YourProgram\...). Then test on startup if the test period is gone by comparing the date from the registry with the current date.
Probably you should encrypt the registry value somehow...

Regards, Madshi.
0
 
LVL 1

Author Comment

by:xpher
ID: 1350813
Madshi
Sounds good. How?
Excuse me quite new to this.

Regards
Chris
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 8

Accepted Solution

by:
ZifNab earned 50 total points
ID: 1350814
xpher,

here are free components with source :

http://www.torry.ru/vcl/security/arprotector.zip
http://www.torry.ru/vcl/security/registera.zip
http://www.torry.ru/vcl/security/mtsharware.zip
http://www.torry.ru/vcl/security/tshare.zip

free components without source :

http://www.torry.ru/vcl/security/easylic.zip

Regards, Zif.

Madshi, hope you don't mind I gave these links, I'm sure your example will be the same like these or even better.
0
 
LVL 20

Expert Comment

by:Madshi
ID: 1350815
Zif, no problem!
If xpher like your links I can save the time to write some sources for him...

Regards, Madshi.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1350816
Hi Madshi, that's what I thought too... We all need our time and why not using already created code which is offered for free? See you Zif.
0
 
LVL 1

Author Comment

by:xpher
ID: 1350817
ZifNab
Thanks for component links. I've been trying the tshare I can get it to work but am still confused about how to stop it creating messages once the software is registered. Any comments

Many thanks
Chris
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1350818
I'll look at the component.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1350819
Hi xpher,

this component only gives you the apportunity for making a shareware trial version. You still have to provide the code for after registration handling : e.g.

unit TestFrm;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Shareware, ExtCtrls;

type
  TTestForm = class(TForm)
    Panel1: TPanel;
    Label2: TLabel;
    Button1: TButton;
    Shareware1: TShareware;
    procedure Button1Click(Sender: TObject);
    procedure FormActivate(Sender: TObject);
  private
    { Déclarations privées }
  public
    { Déclarations publiques }
    function Registered : Boolean;
  end;

var
  TestForm: TTestForm;

implementation

{$R *.DFM}

function TTestForm.Registered: Boolean;
begin
 {Put here your actions, e.g. checking if program is registered}
end

procedure TTestForm.Button1Click(Sender: TObject);
begin
Close;
end;

procedure TTestForm.FormActivate(Sender: TObject);
begin
 If not(Registered) then Shareware1.Execute;
end;

end.

Where Registered first detects if program is registered are not.

Perhaps the other links will provide you a code which does registering and trial-test. But, if you use this component, you can use your own registering method.

Regards, Zif.
0
 
LVL 1

Author Comment

by:xpher
ID: 1350820
Thanks ZifNab, got the idea now.
Cheers
Chris :)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi component that can load a DLL in design time? 8 73
Simple Delphi Question 9 95
Delphi - replicating a form 8 81
Graphics32 under Delphi 10.1 Berlin 2 96
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question