View previous topic :: View next topic |
Author |
Message |
brettr
Joined: 09 Apr 2007 Posts: 16
|
Posted: Thu Jul 19, 2007 6:35 pm Post subject: Resetting DaysInUse |
|
|
I have deleted the license file for my winform app, which reverts it to trial mode. However, EvaluationMonitor.DaysInUse doesn't reset. Is there a way to set it back to zero? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu Jul 19, 2007 10:19 pm Post subject: |
|
|
To reset the evaluation period you need to call the EvaluationMonitor class Reset method. You can either do this from within your application (say when the user enters a special license key) or by writing a simple command line app that creates an EvaluationMonitor instance (with the same password as your app) and then calls Reset. _________________ Infralution Support |
|
Back to top |
|
|
brettr
Joined: 09 Apr 2007 Posts: 16
|
Posted: Thu Jul 19, 2007 11:25 pm Post subject: |
|
|
Thanks. Is there a recommended method for setting a value to the DaysInUse? This is helpful for surpassing the trial period? DaysInUse and FirstUseDate are both read only. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri Jul 20, 2007 7:43 am Post subject: |
|
|
The easiest way is to change your system clock forward and then run your application. Since the EvaluationMonitor stores the date at which the application was run and calculates the days in use based on the system clock.
Note that if you change your clock forward and run your app, then change it back again and run your app again the EvaluationMonitor.Invalid flag will be set to true - because EvaluationMonitor will have detected potential clock winding (ie normally this indicates an attempt by a user to extend their evaluation by setting their system clock back to a date when the evaluation period was still valid). To enable your app to run again after this you need to call EvaluationMonitor.Reset to reset the evaluation data. _________________ Infralution Support |
|
Back to top |
|
|
|