Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2006
    Posts
    1

    Trial Expiry Problem

    Just a quick question,

    I have inserted this code on startup so that a clients application would expire in 30 days, but now that I have made some changes and re-issued the client another trial of 30 days, his computer keeps stating the trial period is over. Is there some kind of file placed on his computer during the initial install that is now preventing him from running the new version I made. I am using Autoplay Media Studio 6.0. What is the name of the file in the registry that I should be deleting to allow this to work again. Here is the code:

    Expire my Application After Thirty Days
    To make your application expire after thirty days, store the date the program was first run in the registry, and every consecutive time that the program is run, compare the registry to the expiry date (30 days after your program was first installed).

    To accomplish this:

    Insert the following code into the On Startup event of your project:

    -- Initialize variables
    days_left = 30;
    date_installed = Application.LoadValue("My Application", "Date Installed");
    time_limit = 30; --the length of the trial period, in days

    -- Convert string value to number
    date_installed = String.ToNumber(date_installed);


    -- Was date_installed 0 (non-existent)?
    if date_installed == 0 then
    -- Value was nonexistent, create it
    Application.SaveValue("My Application", "Date Installed", System.GetDate(DATE_FMT_JULIAN));
    else
    -- Update days_left
    days_left = (date_installed + time_limit) - System.GetDate(DATE_FMT_JULIAN);
    end

    -- Are there days left?
    if days_left < 1 then
    -- There are not any days left, alert user and exit.
    Dialog.Message("Trial Period Over", "This software has expired");
    Application.Exit();
    else
    -- There are days left, alert user how many
    Dialog.Message("Trial Period", "You have "..days_left.." days left in your trial period.");
    end


    Thanks in advance for all your help.

  2. #2
    Join Date
    Jan 2007
    Posts
    57
    Nice work on this nice one

    cheers SOSO

  3. #3
    Join Date
    Oct 2006
    Location
    London, UK
    Posts
    351
    is there a way you could make it last for 30 runs not 30 days?

Similar Threads

  1. Problem changing from trial to registered versions
    By Staggan in forum Setup Factory 7.0
    Replies: 2
    Last Post: 06-19-2006, 09:47 AM
  2. Problem installing fonts
    By ByronFS in forum Setup Factory 7.0
    Replies: 5
    Last Post: 05-08-2006, 12:23 PM
  3. Problem with trial version
    By sacramento in forum Setup Factory 7.0
    Replies: 1
    Last Post: 03-13-2006, 09:23 AM
  4. INFO: Moving from the Trial Version to Commercial Version
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-07-2002, 08:52 AM
  5. INFO: Tips for Debugging Action Lists in AutoPlay Media Studio 4.0
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-03-2002, 08:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts