Licensing - trial version expired, allow new version to run? - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

toddpatt
Posts: 111
Joined: Fri Jan 08, 2010 1:36 am

Licensing - trial version expired, allow new version to run?

Ahoy,

I am using AI 7.6 build 27499

My employer would like to distribute a trialware version / alpha version of a new product to early testers. My employer would like the trialware version to run for 30 days and then expire. However, unlike traditional trialware, there will be no option to register or purchase the software - we simply want to prevent the user from running the alpha version any longer and thus encourage the user to uninstall it.

I have tested the Licensing feature in AI and it seems to provide the functionality that I need. I created a copy of the "Trialware.aip" fragment and edited a few things to fit my needs.

The problem, however, is how I can allow these early testers to run the beta version and release version of my app. If the alpha version expires, and then the same users try to run a beta version or release version a few months later (which has a higher Product Version and different Product Code than the alpha version), they are still presented with the "trial version expired" dialog (I've tested it on my machines).

Is there a way I can expire the alpha version but still allow later versions to run? Once the alpha version has expired we do not want to activate it, since it represents a very early, proof-of-concept implementation which should not used after the 30 day period.

Another option I considered was to use the Updater with mandatory updates. But the problems with that are:
(a) The jump from alpha to beta may take our dev team several weeks or months, during which time the early testers could continue to use the alpha version. We'd like to expire it after 30 days.
(b) We'd like to explicitly show early testers the "trial period has ended" dialog and lock the app so as to encourage / force them to uninstall.

Thanks for your help,
-Todd
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Licensing - trial version expired, allow new version to run?

Hi Todd,

My suggestion found below uses a specific expiration date for your alpha license instead of using a 30 day period starting from the installation date. Le me know if this is not what you really want and I will propose a new solution which uses the latter form of alpha license.

You can do the following settings for your license:
- on the Options page set the trial limit to 0 days and trial continuation to 0 days
- on the Registration tab set the License Format to User specific customized license and enable only "Expiration Date" (disable License ID checkbox)
- click Customize license template and edit the license template so that everything fits on one line like so:

Code: Select all

Signature: %SIGN% Expiration Date: %EXP%
- click "Generate Registration keys" and set an expiration date for your alpha, then copy the generated license to clipboard and press OK
- note the Location, Key and Name fields in the Runtime Key Location group. These indicate the registry location of the registry value in which your license will be saved. Create that value from the Registry page and paste the license generated on the previous step into the Data field. Make sure the created registry value is of type REG_SZ and not REG_MULTI_SZ
- what we are basically doing is shipping the product along with its alpha license. When the license expires, the application switches to trial mode. We've set the trial period to 0 so there is no trial period.

When you are comming out of alpha simply press the "Reset" button found to the right of the Trial ID field. This will reset your Trial ID efficiently creating a new trial for your beta.

I am attaching a sample project that demonstrates the behavior you are seeking. To test it, you may want to generate a new license with an expiration date in the near future, placing it in the appropriate registry value on the Registry page. Build the project, install it (preferably on a virtual machine). Launch the app and check that it works without displaying any trial or expiration messages. Change the system time to a point beyond the date the license expires at then relaunch the application. It should display the license expired dialog.

Best regards,
Gabriel
Attachments
alpha_sample.zip
(651.43 KiB) Downloaded 536 times
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
toddpatt
Posts: 111
Joined: Fri Jan 08, 2010 1:36 am

Re: Licensing - trial version expired, allow new version to run?

Hi Gabriel,

Thank you for the very detailed information and sample project! Your solution sounds promising, but I just have some follow-up questions.

1. Since the alpha version would ship with its license (as you described), could users potentially disable the expiration (and thus continue using the software) by deleting those registry keys? These would be trusted alpha / beta testers, so I'm not concerned about them trying to hack the product, but I just would like to tell my manager whether it's possible.
Maybe I misunderstood - If a user hacked the registry and deleted those keys, would the license expire immediately, even if the expiration date had not been passed?

2. The final release version of the product should not contain any license or expiration. Assuming I followed your solution, how would I remove the license for the release version? Would it be as simple as just deleting the trial from the Licensing page?

3. Assuming my project is configured with the "Automatically upgrade older product versions" option, and that my release version will have a higher Product Version and different Product Code than the alpha version, will the alpha users be able to run the release installer and expect it to automatically uninstall the expired alpha version (assuming they did not already uninstall)?

Thanks again,
-Todd
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Licensing - trial version expired, allow new version to run?

Hi Todd,

1) Should the registry key(s) be deleted, the product will enter trial mode. Trial is set to 0 so the application will be rendered unusable.
The registries can not be altered in any way due to them being digitally signed.

2) Yes, simply delete the trial from the licensing page.

3) Yes, automatic updates will work as expected.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”