Thank you for your post.
Include a script that checks to see if a specific field is blank. If so, then put in today's date. If the field is not blank, then subtract today's date from the date inside the field and that will tell you how many days have occurred since the solution was first started. Subtract from 30 to get days remaining. Or, if greater than 30, display a message and halt the program.
Let me know if you need clarification for any of the above steps.
Just a side note to this..
If the solution has import / export or backup facilities, you would need to ensure the date field does not get imported.
I would look for a more complex solution, depending on the solution of course, since they could simply re-install after 30 days and the date field would be blank again, not to mention there are a lot of ways to change the PC date, launch a program then change the date back which could circumvent the protection.
Using a plugin, you could write to a hidden registry key (if on windows) setting the install date and check this
Plugins like gbbpro : http://gbpro.de/index_en.html
Or Code-X : http://www.hi-voltage.com.au/codex.php
I suppose it all depends on how much you want to secure your product.
P.S I am not affiliated with any of the above companies.
Sorry for the second post, just had another idea
You could set a date field, then export this to a pre-defined hidden location
Upon loading, you could import and check this date to see when it was set
To help prevent a file search containing the date, you could offset the date so it doesnt seem relevant, or include other fictisuous (spelling) data
Solution first run on 13/10/2009
Set field start_date = 13/10/2009 - 322 days
Export field contents to c:\windows\System32 (for example)
Since its a single field, the export would happen very quick, and no progress displayed
Import field contents to start_date_confirm
If start_date_confirm = start_date then continue with check
-- if start_date + 352 days >= today show message stating demo has expired (352 days includes the offset days + 30 for your limit)
-- else continue
else check faled
-- show message stating demo has expired
Along those lines anyway
Seems to me that the nature of the shareware solution can determine the kind of the protection needed. For instance, if the user would not benefit from reinstalling every 30 days to avoid having to register, the method outlined by TSGal would seem to suffice. For instance, a solution that keeps track of ongoing data (an accounting application, for instance) is a solution that the user wouldn't want to reinstall every 30 days. So if you store their install date in a hidden field in the same file that holds all their critical data, they're not going go benefit from reinstalling and having to re-enter all that data all over again. If this solution is a multiple-file solution, where you keep data and user interface in different FMP files, then obviously the hidden date field would be in the data file, not the interface file.
If doing it this method, you would need further date checking in multiple places amongst multiple actions, such as :
on new record creation AND on print record AND anything else you could think of where a date is important to the solution.
The reason being... what is to stop me using a freely available application to change the date on the system, wait for the solution to load and allow access, then change the date back, thus giving me unlimited usage !
Having the date check also run on record creation, will help prevent this, since im unlikely to want to keep swapping the dates to and fro
Having it check during a print job with todays date prefixed on the invoice layout would also mean all my invoices would show my 'hack' date making my printouts useless.
Just saying.. theres more thought that needs to go into it rather than a simple, check the date at startup. This is insufficient for ANY solution.
It doesnt take a rocket scientist to think about changing their PC date back to launch a program, then forward again during usage.
Also, when compiling the demo in runtime mode, ensure you remove Admin privelages from the file, if you dont then your basically releasing your entire system wide open to editting by anybody with a little know how..