How to make the time report start at the program start (15 days), so that after 15 days the program deletes itself.
It is advisable to do with if else .
OnCreate; begin if DaysBetween(startdate,now)>15 then application.terminate; end;
In the variable startdate you hold the date of the first launch, and where you decide to keep it, you want in the registry you want in the file, if you have enough knowledge, you can keep the resources in the ekzeshnik itself.
do not forget to add DateUtils in Uses
Will not work. Your program is probably installed on the client machine in a directory with rights to write root (administrator), that is, on Windows in
%PROGRAMFILES% . And it is launched with the rights of the client. That is, there is no access to the directory for recording, you will not be able to remove yourself.
Of course, you can simply stop the program (by issuing an appropriate message to the user). Note, however, that your program is completely under the control of the user, so that a qualified user will find a way around the restriction.
PS: Do you necessarily
else ? And
case in any way?