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!

kkjay
Posts: 5
Joined: Fri Feb 28, 2014 9:12 am

Enabling Software Expiry after 30 days and after 1 year.

I am using Advanced Installer 10.7 to build a C# windows desktop application. I have already included a 30 day trial for my program by using the licensing feature.

The program uses a trial serial for for 30 days after which a user has to enter a registration serial after the trial period has expired.

I now want to add another feature on top of that. I want the application to run for one year (365 days) after installation after which a user will be required to enter another key to continue using the program. Of course the program will be registered fully by then.
The reason for this is to make sure that customers pay their annual fees for the program including maintenance.

How do I achieve this? Do I simply add a new Synced Variant under my Trial Licensing and if so, what are the steps required?

Any help appreciated.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Enabling Software Expiry after 30 days and after 1 year.

Hello,

In order to achieve what you want you should configure your trial to use a specific customized license and include a maintenance plan element. Just go to "Licensing" page -> "Registration" tab, select the "User specific customized license" option and enable the "Maintenance Plan" option. Then, you can retrieve the MP license element within your application code using the GetPropertyValue library function.

If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kkjay
Posts: 5
Joined: Fri Feb 28, 2014 9:12 am

Re: Enabling Software Expiry after 30 days and after 1 year.

Thanks a lot for your quick reply. I will try it out and see how it works.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Enabling Software Expiry after 30 days and after 1 year.

You're welcome. If you have any questions just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kkjay
Posts: 5
Joined: Fri Feb 28, 2014 9:12 am

Re: Enabling Software Expiry after 30 days and after 1 year.

Hi Daniel,

I was unable to access this forum for quite some time until now.

You recommended using User specified customized license -> Maintenance Plan option. It says that this option allows the license to be valid only for versions released before maintenance plan ends. My question is: I may have a user that is using a specific version for more than one year. Kinda like people who still use IE 7 web browser and do not change. What will happen to them at the end of the year? Will the registration license still work.

It is important to note that I still want the 30 day trial and registration before/after trial period ends enabled. Isn't the option User specified customized license -> Expiration Date more suitable? Once the registration key after one year ends, how do I make another key good for another year?

Another issued that I have is debugging the new changes that I made on the licensing. I have added the new Trial.dll to my 'bin -> Release' folder in Visual Studio. However, the program gets killed early on as shown:

Code: Select all

 private void InitTrial()
        {
            try
            {
                // Wait 2 second for the main window to be visible.
                Thread.Sleep(2000);

                Process process = Process.GetCurrentProcess();
                InitTrial(kLibraryKey, process.MainWindowHandle);  <----------------------------------------Application stops here

                // To prevent your application being killed when unlicensed and trial expired 
                // ReadSettingsRetStr must be called which will return 4 or greater instead of killing the app 
                uint ret = InitTrialReturn(kLibraryKey, process.MainWindowHandle);

                if (ret == 0)
                    GlobalClass.Registered = "Registered version.";
                else if (ret == 2)
                    GlobalClass.Registered = "Trial version.";
                else
                    GlobalClass.Registered = "Unlicensed.";

                if (ret >= 4)
                {
                    MessageBox.Show("Invalid mode to run application. Check your licensing");
                    // disable the application 
                    Process.GetCurrentProcess().Kill();
                }
This was not the case when the Licence Format was 'Serial Number'. This makes it hard to debug my program.

I have installed/uninstalled my application several times on my computer including registering it with a serial. How do I properly "clean" the registry so I can perform tests?

Regards,

Kinyanjui
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Enabling Software Expiry after 30 days and after 1 year.

Hello Kinyanjui,
You recommended using User specified customized license -> Maintenance Plan option. It says that this option allows the license to be valid only for versions released before maintenance plan ends. My question is: I may have a user that is using a specific version for more than one year. Kinda like people who still use IE 7 web browser and do not change. What will happen to them at the end of the year? Will the registration license still work.
Yes, using the maintenance plan option the license will always be valid for product versions released before the maintenance plan ends.
It is important to note that I still want the 30 day trial and registration before/after trial period ends enabled. Isn't the option User specified customized license -> Expiration Date more suitable? Once the registration key after one year ends, how do I make another key good for another year?
I apologize for misunderstanding your requirement. Indeed, if you want your application to expire after one year you can use the "User specific customized license" -> "Expiration Date" option. Also, after the license expire you should request the user to extend its maintenance and register again the application.

You could manually generate registration keys from our "Licensing Registration Tab" -> "Generate Registration Keys" hyperlink or you can configure a license server to check and send licenses and add its URL in the "Licensing Registration Tab" -> "License Server" field.
Another issued that I have is debugging the new changes that I made on the licensing. I have added the new Trial.dll to my 'bin -> Release' folder in Visual Studio. However, the program gets killed early on as shown:
Please keep in mind that in order to test and debug the licensing feature added to your project you should not copy the "trial.dll" file from the Advanced Installer installation folder. You should first build and install your project and, then copy the installed "trail.dll" file into your Visual Studio solution output folder. Please take a look on our "Advanced Licensing - Debugging in Visual Studio" thread which could be useful for you.

Also, please keep in mind that the "ReadSettingsStr" function will kill the application when trial expired and unlicensed. So, you should edit the "InitTrial" method to call the "ReadSettingsRetStr" function of the "trial.dll", which will NOT kill the application when trial expired and unlicensed.
I have installed/uninstalled my application several times on my computer including registering it with a serial. How do I properly "clean" the registry so I can perform tests?
For this you should install Advanced Installer on your test machine and follow the steps from "Trial Uninstall and Clean-up" article.

If you have any question just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”